Better mutation and event assertions for descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120368

Reviewed by Andreas Kling.

Add mutation assertions to all functions.
Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
just to avoid assertions.

* dom/ChildIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/DescendantIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
        
    Make idiomatic.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
https://bugs.webkit.org/show_bug.cgi?id=120364

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-08-27
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

Source/WebCore:

JIRA 461232
When rotating device from landscape mode to portrait mode, we updated
texture contents based on landscape mode front visibility and back
visibility on WebKit thread at the very beginning and the landscape mode
tiles wouldn't be able to cover the portrait mode screen which resulted
in the screen flash.
It's hard to compute front visibility information on WebKit thread because
it doesn't know where the layers will be on the screen. Therefore, the
front visibility won't be updated until the first time we draw textures
on compositing thread.
The patch traverses through LayerWebKitThread and LayerCompositingThread
and discards back visibility and front visibility respectively if there
is a pending orientation. In this way, we can pick up layerTilerPrefillRect
as visibleRect instead of the visibleRect from the stale visibilities
and add more tiles for uncovered screen when updating texture contents
on WebKit thread.
The patch also fixes a bug that we prune tiles based on the stale
m_requiredTextureSize in pruneTextures(). We should prune tiles based
on the updated pendingTextureSize instead.

* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::discardFrontVisibility):
* platform/graphics/blackberry/LayerCompositingThread.h:
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore::LayerCompositingThreadClient::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::discardFrontVisibility):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::discardBackVisibility):
* platform/graphics/blackberry/LayerTiler.h:
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::discardBackVisibility):
* platform/graphics/blackberry/LayerWebKitThread.h:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPagePrivate::discardLayerVisibilities):
(BlackBerry::WebKit::WebPagePrivate::discardFrontVisibilityCompositingThread):
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::discardFrontVisibility):
* Api/WebPageCompositor_p.h:
* Api/WebPage_p.h:
* WebKitSupport/FrameLayers.cpp:
(BlackBerry::WebKit::FrameLayers::discardBackVisibility):
* WebKitSupport/FrameLayers.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cell width / offsetTop incorrect
https://bugs.webkit.org/show_bug.cgi?id=11582

Reviewed by David Hyatt.

Source/WebCore:

The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
a lot of tests.

Test: fast/table/offset-top-includes-border.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):

LayoutTests:

* fast/dom/Element/offsetTop-table-cell-expected.txt:
* fast/dom/Element/offsetTop-table-cell.html:
* fast/table/offset-top-includes-border-expected.txt: Added.
* fast/table/offset-top-includes-border.html: Added.
* platform/mac/editing/selection/5057506-2-expected.txt:
* platform/mac/editing/selection/5057506-expected.txt:
* platform/qt/editing/selection/5057506-2-expected.txt:
* platform/qt/editing/selection/5057506-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Debugger should have Continue to Here Context Menu
https://bugs.webkit.org/show_bug.cgi?id=120189

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

When paused in the debugger and presenting a Context Menu in the
gutter, include a "Continue to Here" option. This requires a
script/line/column location combination.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.continueToLocation):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.scriptForLocation):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.continueToLocation):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NRWT on AppleWin port should delete semaphore lock files during cleanup tasks.
https://bugs.webkit.org/show_bug.cgi?id=120370.

Reviewed by Brent Fulgham.

* Scripts/webkitpy/port/win.py:
(WinPort.delete_sem_locks):
(WinPort.setup_test_run):


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