Skip to content

Commit

Permalink
Remove redundant argument being passed to didRecalcStyle
Browse files Browse the repository at this point in the history
This patch removs an unused argument (StyleRecalcChange) to Element and
other classes implementing didRecalcStyle.

CL that added the function to be used is:
https://chromium.googlesource.com/chromium/src/+/a08e0f58a0f6083552f619e9c88888b82d8de6b5%5E%21

It was used in SVGUseElement

(thanks bugsnash@ for the investigation)

BUG=595137

Review-Url: https://codereview.chromium.org/2658073003
Cr-Commit-Position: refs/heads/master@{#446864}
  • Loading branch information
nainar authored and Commit bot committed Jan 28, 2017
1 parent 04617ab commit 57e530f
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions third_party/WebKit/Source/core/dom/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling) {
}

if (hasCustomStyleCallbacks())
didRecalcStyle(change);
didRecalcStyle();
}

PassRefPtr<ComputedStyle> Element::propagateInheritedProperties(
Expand Down Expand Up @@ -3728,7 +3728,7 @@ void Element::willRecalcStyle(StyleRecalcChange) {
DCHECK(hasCustomStyleCallbacks());
}

void Element::didRecalcStyle(StyleRecalcChange) {
void Element::didRecalcStyle() {
DCHECK(hasCustomStyleCallbacks());
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/dom/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ class CORE_EXPORT Element : public ContainerNode {
void childrenChanged(const ChildrenChange&) override;

virtual void willRecalcStyle(StyleRecalcChange);
virtual void didRecalcStyle(StyleRecalcChange);
virtual void didRecalcStyle();
virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject();

virtual bool shouldRegisterAsNamedItem() const { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void FirstLetterPseudoElement::attachFirstLetterTextLayoutObjects() {
nextLayoutObject->destroy();
}

void FirstLetterPseudoElement::didRecalcStyle(StyleRecalcChange) {
void FirstLetterPseudoElement::didRecalcStyle() {
if (!layoutObject())
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FirstLetterPseudoElement final : public PseudoElement {
private:
explicit FirstLetterPseudoElement(Element*);

void didRecalcStyle(StyleRecalcChange) override;
void didRecalcStyle() override;

void attachFirstLetterTextLayoutObjects();
ComputedStyle* styleForFirstLetter(LayoutObject*);
Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/dom/PseudoElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bool PseudoElement::layoutObjectIsNeeded(const ComputedStyle& style) {
return pseudoElementLayoutObjectIsNeeded(&style);
}

void PseudoElement::didRecalcStyle(StyleRecalcChange) {
void PseudoElement::didRecalcStyle() {
if (!layoutObject())
return;

Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/dom/PseudoElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CORE_EXPORT PseudoElement : public Element {
PseudoElement(Element*, PseudoId);

private:
void didRecalcStyle(StyleRecalcChange) override;
void didRecalcStyle() override;

PseudoId m_pseudoId;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ String HTMLFormControlElement::resultForDialogSubmit() {
return fastGetAttribute(valueAttr);
}

void HTMLFormControlElement::didRecalcStyle(StyleRecalcChange) {
void HTMLFormControlElement::didRecalcStyle() {
if (LayoutObject* layoutObject = this->layoutObject())
layoutObject->updateFromElement();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class CORE_EXPORT HTMLFormControlElement : public LabelableElement,
InputDeviceCapabilities* sourceCapabilities) override;
void willCallDefaultEventHandler(const Event&) final;

void didRecalcStyle(StyleRecalcChange) override;
void didRecalcStyle() override;

// This must be called any time the result of willValidate() has changed.
void setNeedsWillValidateCheck();
Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ void HTMLMediaElement::attachLayoutTree(const AttachContext& context) {
layoutObject()->updateFromElement();
}

void HTMLMediaElement::didRecalcStyle(StyleRecalcChange) {
void HTMLMediaElement::didRecalcStyle() {
if (layoutObject())
layoutObject()->updateFromElement();
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/html/HTMLMediaElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class CORE_EXPORT HTMLMediaElement
InsertionNotificationRequest insertedInto(ContainerNode*) final;
void didNotifySubtreeInsertionsToDocument() override;
void removedFrom(ContainerNode*) final;
void didRecalcStyle(StyleRecalcChange) final;
void didRecalcStyle() final;

bool canStartSelection() const override { return false; }

Expand Down
4 changes: 2 additions & 2 deletions third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1947,8 +1947,8 @@ void HTMLSelectElement::hidePopup() {
m_popup->hide();
}

void HTMLSelectElement::didRecalcStyle(StyleRecalcChange change) {
HTMLFormControlElementWithState::didRecalcStyle(change);
void HTMLSelectElement::didRecalcStyle() {
HTMLFormControlElementWithState::didRecalcStyle();
if (popupIsVisible())
m_popup->updateFromElement(PopupMenu::ByStyleChange);
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/html/HTMLSelectElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class CORE_EXPORT HTMLSelectElement final
bool isPresentationAttribute(const QualifiedName&) const override;

LayoutObject* createLayoutObject(const ComputedStyle&) override;
void didRecalcStyle(StyleRecalcChange) override;
void didRecalcStyle() override;
void detachLayoutTree(const AttachContext& = AttachContext()) override;
void appendToFormData(FormData&) override;
void didAddUserAgentShadowRoot(ShadowRoot&) override;
Expand Down

0 comments on commit 57e530f

Please sign in to comment.