[Webkit-unassigned] [Bug 28866] when you add a new css rule via the web inspector, reload the page, and try again it will not work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 1 08:35:13 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28866





--- Comment #1 from Joseph Pecoraro <joepeck at webkit.org>  2009-09-01 08:35:13 PDT ---
We do still have a reference to the style element, which needs to be cleared:

    delete InjectedScript.stylesheet;

However, there is no safe place to clear this.  The ElementPanel's constructor
does not appear to get rerun on a refresh, only reset(). However, reset() gets
called all over the place and making new stylesheets would lose access to
deleting old rules.  I have a similar problem with Cookies in the StoragePanel
which I alluded to in Bug 27202.

I propose adding a hook for panels names something like "onpageload" or
"onrefresh".  The idea being (correct me if I am wrong):

  - A Panel's Constructor is run once when the Inspector is first opened
  - populateInterface() is run when ...?
  - reset() is called all over the place without knowledge of new pages
  - onpageload() would be called on navigation (including page refresh)

onpageload() plugs the hole of wanting to do something once per page load such
as:

  - Wiping (or Creating) the Injected Stylesheet
  - Adding the Cookies Tree Element once, because it need only be made once

Uglier, but still usable would be providing a flag to reset like
reset(isPageLoad) which could be made true on new page loads.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list