[GTK] [WK2] TestWebKitWebView page-visibility fails
https://bugs.webkit.org/show_bug.cgi?id=120406

Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Removed the webkit prefix for document visibility properties.

* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewPageVisibility):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[cairo] canvas drawing on itself doesn't work with accelerated canvas
https://bugs.webkit.org/show_bug.cgi?id=118808

Reviewed by Martin Robinson.

Source/WebCore:

When copying an accelerated image, we try to get its dimensions with
cairo_image_surface_get_width/cairo_image_surface_get_height. As
surface is not an image, this returns width and height of 0.

Many other places use cairo_image_surface_get although the surface may
be a gl surface.

This patch fixes those issues by implementing a cairoSurfaceSize
helper that returns the surface size whatever type it is.

It use cairo_surface_create_similar instead of
cairo_image_surface_create in copyCairoImageSurface. It also calls
cairo_paint in encodeImage when a drawing over a black background is
needed.

It copies the surface to an image surface if needed in extractImage.

No new tests. Covered by existing tests.

* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface):
(WebCore::cairoSurfaceSize):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(cairoSurfaceToGdkPixbuf):
* platform/graphics/gtk/GdkCairoUtilities.h:
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::BitmapImage::getGdkPixbuf):
* platform/gtk/DragIcon.cpp:
(WebCore::DragIcon::setImage):

Source/WebKit/gtk:

Change cairoImageSurfaceToGdkPixbuf to cairoSurfaceToGdkPixbuf.

* webkit/webkitfavicondatabase.cpp:
(getIconPixbufSynchronously):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream changes to WebCore/style
https://bugs.webkit.org/show_bug.cgi?id=120173

Reviewed by Darin Adler.

* style/StyleResolveTree.cpp:
(WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change StackIterator to not require writes to the JS stack.
https://bugs.webkit.org/show_bug.cgi?id=119657.

Reviewed by Geoffrey Garen.

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/CallFrame.h:
- Removed references to StackIteratorPrivate.h.
* interpreter/StackIterator.cpp:
(JSC::StackIterator::numberOfFrames):
(JSC::StackIterator::gotoFrameAtIndex):
(JSC::StackIterator::gotoNextFrame):
(JSC::StackIterator::resetIterator):
(JSC::StackIterator::find):
(JSC::StackIterator::readFrame):
(JSC::StackIterator::readNonInlinedFrame):
- Reads in the current CallFrame's data for non-inlined frames.
(JSC::inlinedFrameOffset):
- Convenience function to compute the inlined frame offset based on the
  CodeOrigin. If the offset is 0, then we're looking at the physical frame.
  Otherwise, it's an inlined frame.
(JSC::StackIterator::readInlinedFrame):
- Determines the inlined frame's caller frame. Will read in the caller
  frame if it is also an inlined frame i.e. we haven't reached the
  outer most frame yet. Otherwise, will call readNonInlinedFrame() to
  read on the outer most frame.
  This is based on the old StackIterator::Frame::logicalFrame().
(JSC::StackIterator::updateFrame):
- Reads the data of the caller frame of the current one. This function
  is renamed and moved from the old StackIterator::Frame::logicalCallerFrame(),
  but is now simplified because it delegates to the readInlinedFrame()
  to get the caller for inlined frames.
(JSC::StackIterator::Frame::arguments):
- Fixed to use the inlined frame versions of Arguments::create() and
  Arguments::tearOff() when the frame is an inlined frame.
(JSC::StackIterator::Frame::print):
(debugPrintCallFrame):
(debugPrintStack):
- Because sometimes, we want to see the whole stack while debugging.
* interpreter/StackIterator.h:
(JSC::StackIterator::Frame::argumentCount):
(JSC::StackIterator::Frame::callerFrame):
(JSC::StackIterator::Frame::callee):
(JSC::StackIterator::Frame::scope):
(JSC::StackIterator::Frame::codeBlock):
(JSC::StackIterator::Frame::bytecodeOffset):
(JSC::StackIterator::Frame::inlinedFrameInfo):
(JSC::StackIterator::Frame::isJSFrame):
(JSC::StackIterator::Frame::isInlinedFrame):
(JSC::StackIterator::Frame::callFrame):
(JSC::StackIterator::Frame::Frame):
(JSC::StackIterator::Frame::~Frame):
- StackIterator::Frame now caches commonly used accessed values from
  the CallFrame. It still delegates argument queries to the CallFrame.
(JSC::StackIterator::operator*):
(JSC::StackIterator::operator->):
(JSC::StackIterator::operator!=):
(JSC::StackIterator::operator++):
(JSC::StackIterator::end):
(JSC::StackIterator::operator==):
* interpreter/StackIteratorPrivate.h: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Consolidate inspector-protocol Debugger tests
https://bugs.webkit.org/show_bug.cgi?id=120449

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-29
Reviewed by Timothy Hatcher.

Move the tests, and clean-up their syntax a bit to be more
consistent, readable, and compact.

* inspector-protocol/debugger/column-breakpoint.html:
* inspector-protocol/debugger/pause-dedicated-worker-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt.
* inspector-protocol/debugger/pause-dedicated-worker.html: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html.
* inspector-protocol/debugger/resources/dedicated-worker.js: Renamed from LayoutTests/inspector-protocol/resources/dedicated-worker.js.
* inspector-protocol/debugger/setVariableValue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue-expected.txt.
* inspector-protocol/debugger/setVariableValue.html: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue.html.
* inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused-expected.txt.
* inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SharedBuffer m_segments and m_dataArray must be exclusive
https://bugs.webkit.org/show_bug.cgi?id=77715

Patch by Pratik Solanki <pratik.solanki@gmail.com> on 2013-08-29
Reviewed by Benjamin Poulain.

When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
data. We do not use m_segments. Since they are exclusive in practice, do not define or use
m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.

No new tests because no functional changes.

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::clear):
(WebCore::SharedBuffer::copy):
(WebCore::SharedBuffer::buffer):
(WebCore::SharedBuffer::getSomeData):
* platform/SharedBuffer.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeBlock compilation and installation should be simplified and rationalized
https://bugs.webkit.org/show_bug.cgi?id=120326

Reviewed by Oliver Hunt.
        
Rolling r154804 back in after fixing no-LLInt build.
        
Previously Executable owned the code for generating JIT code; you always had
to go through Executable. But often you also had to go through CodeBlock,
because ScriptExecutable couldn't have virtual methods, but CodeBlock could.
So you'd ask CodeBlock to do something, which would dispatch through a
virtual method that would select the appropriate Executable subtype's method.
This all meant that the same code would often be duplicated, because most of
the work needed to compile something was identical regardless of code type.
But then we tried to fix this, by having templatized helpers in
ExecutionHarness.h and JITDriver.h. The result was that if you wanted to find
out what happened when you asked for something to be compiled, you'd go on a
wild ride that started with CodeBlock, touched upon Executable, and then
ricocheted into either ExecutionHarness or JITDriver (likely both).
        
Another awkwardness was that for concurrent compiles, the DFG::Worklist had
super-special inside knowledge of what JITStubs.cpp's cti_optimize would have
done once the compilation finished.
        
Also, most of the DFG JIT drivers assumed that they couldn't install the
JITCode into the CodeBlock directly - instead they would return it via a
reference, which happened to be a reference to the JITCode pointer in
Executable. This was super weird.
        
Finally, there was no notion of compiling code into a special CodeBlock that
wasn't used for handling calls into an Executable. I'd like this for FTL OSR
entry.
        
This patch solves these problems by reducing all of that complexity into just
three primitives:
        
- Executable::newCodeBlock(). This gives you a new code block, either for call
  or for construct, and either to serve as the baseline code or the optimized
  code. The new code block is then owned by the caller; Executable doesn't
  register it anywhere. The new code block has no JITCode and isn't callable,
  but it has all of the bytecode.
        
- CodeBlock::prepareForExecution(). This takes the CodeBlock's bytecode and
  produces a JITCode, and then installs the JITCode into the CodeBlock. This
  method takes a JITType, and always compiles with that JIT. If you ask for
  JITCode::InterpreterThunk then you'll get JITCode that just points to the
  LLInt entrypoints. Once this returns, it is possible to call into the
  CodeBlock if you do so manually - but the Executable still won't know about
  it so JS calls to that Executable will still be routed to whatever CodeBlock
  is associated with the Executable.
        
- Executable::installCode(). This takes a CodeBlock and makes it the code-for-
  entry for that Executable. This involves unlinking the Executable's last
  CodeBlock, if there was one. This also tells the GC about any effect on
  memory usage and does a bunch of weird data structure rewiring, since
  Executable caches some of CodeBlock's fields for the benefit of virtual call
  fast paths.
        
This functionality is then wrapped around three convenience methods:
        
- Executable::prepareForExecution(). If there is no code block for that
  Executable, then one is created (newCodeBlock()), compiled
  (CodeBlock::prepareForExecution()) and installed (installCode()).
        
- CodeBlock::newReplacement(). Asks the Executable for a new CodeBlock that
  can serve as an optimized replacement of the current one.
        
- CodeBlock::install(). Asks the Executable to install this code block.
        
This patch allows me to kill *a lot* of code and to remove a lot of
specializations for functions vs. not-functions, and a lot of places where we
pass around JITCode references and such. ExecutionHarness and JITDriver are
both gone. Overall this patch has more red than green.
        
It also allows me to work on FTL OSR entry and tier-up:
        
- FTL tier-up: this will involve DFGOperations.cpp asking the DFG::Worklist
  to do some compilation, but it will require the DFG::Worklist to do
  something different than what JITStubs.cpp would want, once the compilation
  finishes. This patch introduces a callback mechanism for that purpose.
        
- FTL OSR entry: this will involve creating a special auto-jettisoned
  CodeBlock that is used only for FTL OSR entry. The new set of primitives
  allows for this: Executable can vend you a fresh new CodeBlock, and you can
  ask that CodeBlock to compile itself with any JIT of your choosing. Or you
  can take that CodeBlock and compile it yourself. Previously the act of
  producing a CodeBlock-for-optimization and the act of compiling code for it
  were tightly coupled; now you can separate them and you can create such
  auto-jettisoned CodeBlocks that are used for a one-shot OSR entry.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::prepareForExecutionImpl):
(JSC::CodeBlock::prepareForExecution):
(JSC::CodeBlock::prepareForExecutionAsynchronously):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::FunctionCodeBlock::jettisonImpl):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasBaselineJITProfiling):
* bytecode/DeferredCompilationCallback.cpp: Added.
(JSC::DeferredCompilationCallback::DeferredCompilationCallback):
(JSC::DeferredCompilationCallback::~DeferredCompilationCallback):
* bytecode/DeferredCompilationCallback.h: Added.
* dfg/DFGDriver.cpp:
(JSC::DFG::tryCompile):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
* dfg/DFGFailedFinalizer.cpp:
(JSC::DFG::FailedFinalizer::finalize):
(JSC::DFG::FailedFinalizer::finalizeFunction):
* dfg/DFGFailedFinalizer.h:
* dfg/DFGFinalizer.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGJITFinalizer.h:
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::notifyReady):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
(JSC::DFG::Plan::finalizeAndNotifyCallback):
* dfg/DFGPlan.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::runThread):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalize):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* heap/Heap.h:
(JSC::Heap::isDeferred):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* jit/JITDriver.h: Removed.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
* jit/JITToDFGDeferredCompilationCallback.cpp: Added.
(JSC::JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::create):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
* jit/JITToDFGDeferredCompilationCallback.h: Added.
* llint/LLIntEntrypoints.cpp:
(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
* llint/LLIntEntrypoints.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::setUpCall):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/CommonSlowPaths.cpp:
* runtime/CompilationResult.cpp:
(WTF::printInternal):
* runtime/CompilationResult.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Executable.h:
(JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
(JSC::ExecutableBase::offsetOfNumParametersFor):
(JSC::ScriptExecutable::prepareForExecution):
(JSC::FunctionExecutable::jettisonOptimizedCodeFor):
* runtime/ExecutionHarness.h: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed gardening. Add missing *.css files from project.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
https://bugs.webkit.org/show_bug.cgi?id=93735

Reviewed by David Hyatt.

Source/WebCore:

Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
intrinsic height or width. This causes them to go down the wrong height and width computation
path in RenderBox when they are absolute positioned.

The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
the helpers for returning their approximation of intrinsic height and width.

The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
The fix for this issue is captured in intrinsic-button-and-input-height.html.

Tests: fast/replaced/intrinsic-button-and-input-height.html
       fast/replaced/width-and-height-of-positioned-replaced-elements.html

* rendering/RenderBox.cpp:
(WebCore::isReplacedElement):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:

LayoutTests:

* fast/replaced/intrinsic-button-and-input-height-expected.txt: Added.
* fast/replaced/intrinsic-button-and-input-height.html: Added.
* fast/replaced/width-and-height-of-positioned-replaced-elements.html: Added.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Added.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: fixed broken non-DFG build.
https://bugs.webkit.org/show_bug.cgi?id=120481.

Not reviewed.

* interpreter/StackIterator.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Download Web Archive of Inspected Page
https://bugs.webkit.org/show_bug.cgi?id=119774

Reviewed by Timothy Hatcher.

Source/WebCore:

Add PageAgent.archive which will return a Base-64 encoded web archive
when successful. In order to then allow saving non-string files, extend
InspectorFrontendHost.save to allow for Base-64 encoded data.

* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* inspector/InspectorPageAgent.h:
Introduce and implement PageAgent.archive. Create a Web Archive of the
page's main frame.

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::save):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::save):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
Extend InspectorFrontendHost.save to include a base64Encoded param.

* inspector/front-end/FileManager.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.save):
Misc. updates to the old inspector for function changes.

Source/WebInspectorUI:

* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._saveDataToFile):
Allow a custom save handler which will do all the work.

* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype.get supportsSave):
(WebInspector.DOMTreeContentView.prototype.get saveData.saveHandler):
(WebInspector.DOMTreeContentView.prototype.get saveData):
Allow Save keyboard shortcut to download an archive viewing the DOM Tree.

* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
(WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange):
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
(WebInspector.FrameTreeElement.prototype._reloadPageClicked):
(WebInspector.FrameTreeElement.prototype._downloadButtonClicked):
(WebInspector.FrameTreeElement.prototype._updateDownloadButton):
(WebInspector.FrameTreeElement.prototype._pageArchiveStarted):
(WebInspector.FrameTreeElement.prototype._pageArchiveEnded):
Move handling of main frame TreeElement buttons to FrameTreeElement.
Add a Download button, and enable/disable it appropriately.

* UserInterface/ResourceTreeElement.css:
* UserInterface/TreeElementStatusButton.css: Copied from Source/WebInspectorUI/UserInterface/ResourceTreeElement.css.
(.item > .status > .status-button):
(.item > .status > .status-button > svg *):
(.item.selected > .status > .status-button > svg *):
(.item.selected > .status > .status-button:active > svg *):
(.item > .status > .status-button.disabled > svg *):
(.item.selected > .status > .status-button.disabled > svg *):
* UserInterface/TreeElementStatusButton.js: Added.
(WebInspector.TreeElementStatusButton):
(WebInspector.TreeElementStatusButton.prototype.get element):
(WebInspector.TreeElementStatusButton.prototype.get hidden):
(WebInspector.TreeElementStatusButton.prototype.set hidden):
(WebInspector.TreeElementStatusButton.prototype.get enabled):
(WebInspector.TreeElementStatusButton.prototype.set enabled):
(WebInspector.TreeElementStatusButton.prototype._clicked):
Make buttons in the TreeElement status a generic class to share styling
and handling of the buttons. New "disabled" state with even more
transparent is used when the page is downloading.

* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.archiveMainFrame):
(WebInspector.canArchiveMainFrame):
Generic API for archiving the page and determining if you can archive it.

* UserInterface/InspectorBackendCommands.js:
* UserInterface/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.save):
* UserInterface/Images/DownloadArrow.svg: Added.
* Localizations/en.lproj/localizedStrings.js:
Misc. updates and new files.

Source/WebKit/mac:

Update to support InspectorFrontendHost.save's new base64Encoded
parameter. It means the incoming content is binary data, not a string.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):

Source/WebKit2:

Update to support InspectorFrontendHost.save's new base64Encoded
parameter. It means the incoming content is binary data, not a string.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::save):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSave):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::save):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::save):
* WebProcess/WebPage/WebInspector.h:

LayoutTests:

* inspector-protocol/page/archive-expected.txt: Added.
* inspector-protocol/page/archive.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Consolidate inspector-protocol tests into domains
https://bugs.webkit.org/show_bug.cgi?id=120450

Reviewed by Timothy Hatcher.

Move around tests and clean them up in the process.

* http/tests/inspector-protocol/resources/protocol-test.js:
* inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt.
* inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html.
* inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt.
* inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html.
* inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt.
* inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html.
* inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html:
* inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html:
* inspector-protocol/heap-profiler/take-heap-snapshot.html:
* inspector-protocol/nmi-webaudio-expected.txt: Removed.
* inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed.
* inspector-protocol/nmi-webaudio-leak-test.html: Removed.
* inspector-protocol/nmi-webaudio.html: Removed.
* inspector-protocol/page/frameScheduledNavigation.html:
* inspector-protocol/page/frameStartedLoading.html:
* inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html.
* inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt.
* inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html.
* inspector-protocol/resources/audio-context.html: Removed.
* inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt.
* inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html.
* platform/efl/TestExpectations:
* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Automake] libWebCoreDOM.la could use a better name
https://bugs.webkit.org/show_bug.cgi?id=120232

Reviewed by Martin Robinson.

Source/WebCore: 

* bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.

Source/WebKit/gtk: 

* GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.

Source/WebKit2: 

* GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a Command-R shortcut in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120442

Reviewed by Dean Jackson.

Add a "Reload Page" item to the View menu with a Command-R
shortcut.

* MiniBrowser/mac/MainMenu.xib:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix slider thumb event handling to use local, not absolute coordinates
https://bugs.webkit.org/show_bug.cgi?id=120480

Reviewed by Darin Adler.

SliderThumbElement::setPositionFromPoint() did all of its coordinate
math by mapping renderer rects into absolute coordinates, which was
unnecessary and expensive.

Fix by doing all the math in the coordinate space of the input's
renderer. This simplified the code. Also, currentPosition
was computed but unused, so was removed.

No behavior change. Tested by fast/forms/range/slider-transformed.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):

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