Crash at RenderStyle::inheritFrom reported by fuzzer
https://bugs.webkit.org/show_bug.cgi?id=112322

Reviewed by Hajime Morrita.

Source/WebCore:

pseudoStyleForElement should check whether a parent style of a given
element is available or not. If a given element's parent is
an insertion point whose reset-style-inheritance is true, the parent
style is not available. Need to use defaultStyleForElement.

Test: fast/dom/shadow/insertion-point-resetStyleInheritance-with-pseudo-element-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
Removed cloneForParent. Instead, made m_state own parentStyle, i.e.
changed m_parentStyle in class State from RenderStyle* to
RefPtr<RenderStyle>.
(WebCore::StyleResolver::pseudoStyleForElement):
If an actual parent style of a given element is not available, use
defaultStyleForElement. This is the same logic as styleForElement.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::setParentStyle):
Modified the parameter to use PassRefPtr<RenderStyle>.
(WebCore::StyleResolver::State::parentStyle):
(State):

LayoutTests:

* fast/dom/shadow/insertion-point-resetStyleInheritance-with-pseudo-element-crash-expected.txt: Added.
* fast/dom/shadow/insertion-point-resetStyleInheritance-with-pseudo-element-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Network] Sort columns context menu items alphabetically.
https://bugs.webkit.org/show_bug.cgi?id=112321

Reviewed by Pavel Feldman.

Problem: columns are presented in "natural" order,
so it is hard to find specific item.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._getConfigurableColumnIDs):
Generate list of column IDs sorted alphabetically.
(WebInspector.NetworkLogView.prototype._contextMenu):
Use alphabetically sorted list of column IDs.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145886 268f45cc-cd09-0410-ab3c-d52691b4dbfc