Null deref under PluginView::handlesPageScaleFactor()
https://bugs.webkit.org/show_bug.cgi?id=119231
<rdar://problem/14440207>

Reviewed by Simon Fraser.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handlesPageScaleFactor):
* WebProcess/Plugins/PluginView.h:
Null-check m_plugin and check m_isInitialized.
Make pageScaleFactor() and handlesPageScaleFactor const.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119223

Reviewed by Kenneth Rohde Christiansen.

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GLContext.cpp and GLContext.h.
* platform/graphics/GLContext.cpp: Copied from WebCore/platform/graphics/cairo/GLContext.cpp.
* platform/graphics/GLContext.h: Copied from WebCore/platform/graphics/cairo/GLContext.h.
* platform/graphics/cairo/GLContext.cpp: Removed.
* platform/graphics/cairo/GLContext.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page count can be incorrect if there is a pending style recalc
https://bugs.webkit.org/show_bug.cgi?id=119232

Reviewed by Beth Dakin.

If style is changed in a way that schedules a style recalc on the Document,
and then Page::pageCount() is called, we may give the wrong answer because
the existing code only checked FrameView::needsLayout(), not whether a style
recale was pending.

Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
as we do for other properties that require layer, and are exposed to JS
or via API.

* page/Page.cpp:
(WebCore::Page::pageCount):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some cleanup in PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119189

Reviewed by Geoff Garen.

PropertySlot represents a property in one of four states - value, getter, custom, or custom-index.
The state is currently tracked redundantly by two mechanisms - the custom getter function (m_getValue)
is set to a special value to indicate the type (other than custom), and the type is also tracked by
an enum - but only if cacheable. Cacheability can typically be determined by the value of m_offset
(this is invalidOffset if not cacheable).

    * Internally, always track the type of the property using an enum value, PropertyType.
    * Use m_offset to indicate cacheable.
    * Keep the external interface (CachedPropertyType) unchanged.
    * Better pack data into the m_data union.

Performance neutral.

* dfg/DFGRepatch.cpp:
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
    - cachedPropertyType() -> isCacheable*()
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
    - cachedPropertyType() -> isCacheable*()
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
    - cachedPropertyType() -> isCacheable*()
* jit/JITStubs.cpp:
(JSC::tryCacheGetByID):
    - cachedPropertyType() -> isCacheable*()
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
    - cachedPropertyType() -> isCacheable*()
* runtime/PropertySlot.cpp:
(JSC::PropertySlot::functionGetter):
    - refactoring described above.
* runtime/PropertySlot.h:
(JSC::PropertySlot::PropertySlot):
(JSC::PropertySlot::getValue):
(JSC::PropertySlot::isCacheable):
(JSC::PropertySlot::isCacheableValue):
(JSC::PropertySlot::isCacheableGetter):
(JSC::PropertySlot::isCacheableCustom):
(JSC::PropertySlot::cachedOffset):
(JSC::PropertySlot::customGetter):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setCustomIndex):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):
(JSC::PropertySlot::setUndefined):
(JSC::PropertySlot::slotBase):
(JSC::PropertySlot::setBase):
    - refactoring described above.



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