Web Inspector: Use Document* as argument in WebSocket Instrumentation.
https://bugs.webkit.org/show_bug.cgi?id=105279.

Patch by Pan Deng <pan.deng@intel.com> on 2012-12-19
Reviewed by Pavel Feldman.

Some WebSocket instrumentation fuctions adopted ScriptExecutionContext* as argument, it is not clear that
their clients and implementations are all using Document*. This patch adopt Document* as argument, and
Document* could supply more information in future.

No functionality changed, no new tests.

* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: refactor DefaultTextEditor's |expanded| setters
https://bugs.webkit.org/show_bug.cgi?id=105415

Patch by Andrey Lushnikov <lushnikov@chromium.com> on 2012-12-19
Reviewed by Pavel Feldman.

Refactor |expanded| setters and getters into |collapse()|, |expand()|
and |expanded()| methods

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
(WebInspector.TextEditorChunkedPanel.prototype._expandChunks):
(WebInspector.TextEditorGutterPanel.prototype.textChanged):
(WebInspector.TextEditorGutterChunk.prototype.expanded): Added.
(WebInspector.TextEditorGutterChunk.prototype.collapse): Added.
(WebInspector.TextEditorGutterChunk.prototype.expand): Added.
(WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
(WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
(WebInspector.TextEditorMainChunk.prototype.expanded): Added.
(WebInspector.TextEditorMainChunk.prototype.collapse): Added.
(WebInspector.TextEditorMainChunk.prototype.expand): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose WebKitShadowRoot constructor to DOMWindow.
https://bugs.webkit.org/show_bug.cgi?id=105385

Reviewed by Dimitri Glazkov.

Source/WebCore:

This is a follow-up patch for r137870.  WebKitShadowRoot
constructor should be in DOMWindow, just like all of the other
not-callable-constructors like HTMLDivElement, etc.  We need it
for instanceof tests and so on.

Test: fast/dom/shadow/shadow-root-js-api.html
      fast/js/global-constructors-expected.html

* page/DOMWindow.idl:

LayoutTests:

* fast/dom/shadow/shadow-root-js-api-expected.txt:
* fast/dom/shadow/shadow-root-js-api.html:
* fast/js/global-constructors-expected.txt:
* platform/efl/fast/js/global-constructors-expected.txt:
* platform/gtk/fast/js/global-constructors-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: default font on mac is Monaco (should do be Menlo)
https://bugs.webkit.org/show_bug.cgi?id=105435

Reviewed by Alexander Pavlov.

Regressed when I introduced mountain lion modifier in the inspector.css.

* inspector/front-end/inspector.css:
(body.platform-mac .monospace, body.platform-mac .source-code):
(body.platform-mac.platform-mac-tiger .source-code):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable Navigation Timing by default
https://bugs.webkit.org/show_bug.cgi?id=105322

Reviewed by Martin Robinson.

The Navigation Timing specification (of which implementation is guarder
by the ENABLE_WEB_TIMING feature define) has been promoted to the W3C Recommendation
status. Because of this we should enable it by default in the release builds of
the GTK port.

No new tests - they already exist and are in majority passing.

* GNUmakefile.am:
* bindings/gobject/GNUmakefile.am: Move the DOM bindings for interfaces related to this
feature out of the unstable features define guard and into the general list.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r138157.
http://trac.webkit.org/changeset/138157
https://bugs.webkit.org/show_bug.cgi?id=105439

Crashes with assertion failures in EFL debug build. (Requested
by drott on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-19

* platform/graphics/texmap/TextureMapperGL.cpp:
(SharedGLData):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawTextureWithAntialiasing):
(WebCore::keyForFilterType):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::TextureMapperGL::beginClip):
* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore):
(ShaderSpec):
(WebCore::ShaderSpec::ShaderSpec):
(WebCore::getShaderSpec):
(WebCore::TextureMapperShaderManager::getShaderProgram):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(TextureMapperShaderProgram):
(TextureMapperShaderManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unable to place the caret at the end of the first line, when followed by a block, in the vertical writing mode.
https://bugs.webkit.org/show_bug.cgi?id=104794

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-12-19
Reviewed by Ryosuke Niwa.

Source/WebCore:

In the vertical writing mode, when trying to place the caret at the end
of a text line which is followed by a block, the local point sent as
part of the hitTest result in the mouse click event is not correct.

When clicking on the empty region (beyond the text) in the first line,
the local point computed is not in accordance with the writing mode.

Test: editing/selection/caret-at-end-of-text-line-followed-by-block-in-vertical-mode.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
Modified the code to handle the point as per the writing mode when
computing the hitTest result. Calling flipForWritingMode() on the
point for achieving the same.

LayoutTests:

* editing/selection/caret-at-end-of-text-line-followed-by-block-in-vertical-mode-expected.txt: Added.
* editing/selection/caret-at-end-of-text-line-followed-by-block-in-vertical-mode.html: Added.
Test added for verifying that a caret is painted at the end of the text
in the first vertical line, when followed by a block.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium/Skia] Check whether bitmap has pixels in image encoders
https://bugs.webkit.org/show_bug.cgi?id=105349

Patch by Brian Salomon <bsalomon@google.com> on 2012-12-19
Reviewed by Stephen White.

This adds NULL checks to the JPEG, PNG, WEBP encoders.

Difficult to test as condition occurs when OOM.

* platform/image-encoders/skia/JPEGImageEncoder.cpp:
(WebCore::JPEGImageEncoder::encode):
* platform/image-encoders/skia/PNGImageEncoder.cpp:
(WebCore::PNGImageEncoder::encode):
* platform/image-encoders/skia/WEBPImageEncoder.cpp:
(WebCore::WEBPImageEncoder::encode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Rebaselining two tests after r137953 and r138102.
Updating test expectations as necessary.

* platform/gtk/TestExpectations:
* platform/gtk/editing/selection/move-by-character-6-expected.txt:
* platform/gtk/fast/css/image-set-value-not-removed-crash-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed gardening.

Adding platform specific expectations since our error msg is chattier,
test was introduced in r138165.
Also, marking a crash failure.

* platform/efl/TestExpectations:
* platform/efl/fast/dom/shadow/shadow-root-js-api-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader
https://bugs.webkit.org/show_bug.cgi?id=105290

Reviewed by Abhishek Arya.

The LinkLoader now removes itself from its prerender in time.

Source/WebCore:

Tested in unit tests, PrerenderingTest.FastRemoveElement.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::~LinkLoader):
(WebCore::LinkLoader::released):

Source/WebKit/chromium:

* tests/PrerenderingTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r137607): PluginDocument loads consume huge amounts of memory
https://bugs.webkit.org/show_bug.cgi?id=105359

Reviewed by Alexey Proskuryakov.

No new tests, verified manually that http://www.scb.se/statistik/_publikationer/NR0001_2012K02_TI_A28TI1203.pdf
no longer consumes several GB of memory.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::setShouldBufferData): shouldBufferData is an enum, not a boolean, so this is reversed.
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data): If the dataReceived() callback tells us to stop buffering data, be sure to
    notify the ResourceLoader and clear the data buffer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support titleUIElement in chromium DRT
https://bugs.webkit.org/show_bug.cgi?id=96529

Reviewed by Chris Fleizach.

Source/WebKit/chromium:

Fix implementation of titleUIElement - it shouldn't return anything
if supportsTitleUIElement returns false, so that accessible label
overriding logic works correctly.

* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::titleUIElement):

LayoutTests:

Modify aria-labelledby-overrides-label.html to be more cross-platform,
with slightly different expectations on Mac & Chromium.

* accessibility/aria-labelledby-overrides-label.html:
* platform/chromium/TestExpectations:
* platform/chromium/accessibility/aria-labelledby-overrides-label-expected.txt: Copied from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.
* platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Renamed from LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 clampTo unit tests are failing
https://bugs.webkit.org/show_bug.cgi?id=105253

Reviewed by Emil A Eklund.

Removed clampToUnsigned as it was actually testing exactly what
clampToUnsignedLong was doing. Also made clampToIntFloat more robust
to precision loss (fix suggested by Emil).

* TestWebKitAPI/Tests/WTF/MathExtras.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix regression from r137923 that caused all tiles to paint when scrolling
https://bugs.webkit.org/show_bug.cgi?id=105394

Reviewed by Dean Jackson.

r137923 removed a 'continue' from the loop that ensures we have tile coverage,
but this caused us to issue repaints for all existing tiles.

Fix to 'continue' when the tile size is unchanged. Also remove 'primaryLayerCount'
which was unused.

* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::revalidateTiles):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fixing incorrect include path and unskipping broken test.

* fast/events/touch/touch-input-element-change-documents.html:
* platform/efl/TestExpectations:
* platform/qt/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Updating expectations following r137847.

* platform/chromium-linux-x86/fast/dom/Window: Added.
* platform/chromium-linux-x86/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/chromium-linux/fast/dom/Window/webkitConvertPoint-expected.txt: Added.
* platform/chromium-linux/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.txt: Removed.
* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-linux/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-lion/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png:
* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-snowleopard/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png:
* platform/chromium-mac-snowleopard/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png
* platform/chromium-mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png:
* platform/chromium-mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png:
* platform/chromium-win/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png: Added.
* platform/chromium-win/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.txt: Added.
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. The previous rebaseline didn't quite get it right for Mac.

* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac-lion/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct missing touch event handler de-registration for nested Documents and DOMWindows
https://bugs.webkit.org/show_bug.cgi?id=105384

Reviewed by James Robinson.

Source/WebCore: 

Correcting case by which a nested DOMWindow wouldn't clean up its event handler references
on its Document when removeAllEventListeners was called. Also, correctly propagating this
from a nested Document to its owner Document.

Updating fast/events/touch/touch-handler-count.html to catch this bug.

* dom/Document.cpp:
(WebCore::Document::didRemoveEventTargetNode):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::removeAllEventListeners):

LayoutTests: 

* fast/events/touch/touch-handler-count-expected.txt:
* fast/events/touch/touch-handler-count.html: Adding case of nested DOMWindows with event handlers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Popup menu on Windows should fade in instead of sliding in.
https://bugs.webkit.org/show_bug.cgi?id=105358
<rdar://problem/7611211>

Reviewed by Timothy Horton.

Changing popup menu display animation to match what most other Windows applications do.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show):


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