[webkit-reviews] review granted: [Bug 202000] Web Inspector: Remove BranchManager in favor of just using currentRevision : [Attachment 379158] [PATCH] Proposed Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 19 22:23:18 PDT 2019


Devin Rousso <drousso at apple.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 202000: Web Inspector: Remove BranchManager in favor of just using
currentRevision
https://bugs.webkit.org/show_bug.cgi?id=202000

Attachment 379158: [PATCH] Proposed Fix

https://bugs.webkit.org/attachment.cgi?id=379158&action=review




--- Comment #3 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 379158
  --> https://bugs.webkit.org/attachment.cgi?id=379158
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=379158&action=review

r=me

> Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:-1016
> -localizedStrings["Show More"] = "Show More";

Where did this come from? o.0

Looks like this came from <https://trac.webkit.org/r250087>.  Odd :|

> Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:658
> +		   let revision = styleSheet.currentRevision;

We could just inline this.

> Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:702
> +	       let revision = representedObject.currentRevision;

Ditto

> Source/WebInspectorUI/UserInterface/Models/Branch.js:-63
> -    revisionForRepresentedObject(representedObject, doNotCreateIfNeeded)

One thing that's different about this vs what you have above is that each time
this is called, it can potentially generate a new `WI.SourceCodeRevision`,
whereas you only do it when processing the content from the backend.

It does look like you've covered all the bases, especially for
`WI.CSSStyleSheet`, but I wonder if this could be done at a "lower" level, like
inside `WI.SourceCode.prototype.get revisionForRequestedContent`, or even
removing the concept of revisions altogether (or make it `WI.CSSStyleSheet` and
`WI.LocalResourceS` only).


More information about the webkit-reviews mailing list