Use jsNontrivialString for strings we know are more than a single character
https://bugs.webkit.org/show_bug.cgi?id=136393

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-02
Reviewed by Geoffrey Garen.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::addUsagesToJSON):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
https://bugs.webkit.org/show_bug.cgi?id=136400

Reviewed by Tim Horton.
Source/WebCore:

RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
with visibility:hidden, and for layers with a mask, and both would cause additional
backing store in some cases.

We can move the hasVisibleContent() to the top of the function, since visibility:hidden
will always hide any content of this layer. The hasMask() check can also be removed;
a mask can only mask content that is already visible; it never contributes additional
pixels.

Tests: compositing/backing/masked-child-no-backing.html
       compositing/backing/replaced-child-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

* compositing/backing/masked-child-no-backing-expected.txt: Added.
* compositing/backing/masked-child-no-backing.html: Added.
* compositing/backing/replaced-child-no-backing-expected.txt: Added.
* compositing/backing/replaced-child-no-backing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
https://bugs.webkit.org/show_bug.cgi?id=136464

Reviewed by Tim Horton.

Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
when layout might be stale; there's not point trying to update the backing store state
when detaching, only when attaching.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure WK1 prefs are initialized in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=136465

Reviewed by Tim Horton.

Call -didChangeSettings from -awakeFromNib for WK1 windows just as we do
for WK2 windows, to make sure that WebPreferences are updated (to get
layer borders to work consistently).

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):

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