Gesture tap highlighting entire first line
https://bugs.webkit.org/show_bug.cgi?id=97668

Patch by Allan Sandfeld Jensen <allan.jensen@digia.com> on 2012-09-26
Reviewed by Kenneth Rohde Christiansen.

Keep better track if which part is the first, middle or last, and adjust the X-edges accordingly.

* page/GestureTapHighlighter.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize stylesheet insertions
https://bugs.webkit.org/show_bug.cgi?id=97627

Reviewed by Andreas Kling.

PerformanceTests: 

Add synthetic performance test for avoiding style recalcs on stylesheet inserts.

* CSS/StyleSheetInsert.html: Added.

Source/WebCore: 

We currently do scope analysis for stylesheets that are added to the end of the active stylesheet list to avoid unnecessary style
recalcs and StyleResolver rebuilding. However it is somewhat common to insert <style> elements dynamically to positions other than last.
In this case we currently simply force full style recalc. We should do scope analysis and partial style recalcs also in these cases.
        
PerformanceTests/CSS/StyleSheetInsert.html microbenchmark shows ~20x progression from the patch.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::resetAuthorStyle):
        
    Add a way to reset author RuleSet without deleting the whole StyleResolver.

(WebCore):
* css/StyleResolver.h:
(StyleResolver):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
        
    Check if there have been insertions to the stylesheet list. If so we need to reset
    the StyleResolver (to handle rule position changes) but don't need to force full
    style recalc. Do scope analysis for inserted stylesheets as well.

(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/DocumentStyleSheetCollection.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: display stack of last layout invalidation instead of first one
https://bugs.webkit.org/show_bug.cgi?id=97677

Reviewed by Vsevolod Vlasov.

- add a call to InspectorInstrumentation::didInvalidateLayout() when upgrading relayout root;
- do not suppress timeline's Invalidate Layout records other than first.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didInvalidateLayout):
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] mediaControlsEflFullscreen.css overrides regular media controls styling
https://bugs.webkit.org/show_bug.cgi?id=97671

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-26
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add missing ":-webkit-full-screen" in mediaControlsEflFullscreen.css so
that regular media controls styling is not overridden by full screen
styling when switching to full screen mode. This was causing a lot of
flakiness in our media tests.

No new tests, already covered by existing media tests.

* css/mediaControlsEflFullscreen.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen:-webkit-full-page-media::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-mute-button):
(video:-webkit-full-screen::-webkit-media-controls-play-button):
(video:-webkit-full-screen::-webkit-media-controls-timeline-container):
(video:-webkit-full-screen::-webkit-media-controls-current-time-display):
(video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
(video:-webkit-full-screen::-webkit-media-controls-timeline):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider-container):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
(video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
(video:-webkit-full-screen::-webkit-media-controls-fullscreen-button):
(video:-webkit-full-screen::-webkit-media-controls-rewind-button):
(video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
(video:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):

LayoutTests:

Unskip several media tests that are no longer flaky
now that we address media controls styling issues
when switching to full screen mode.

Some tests needed rebaselining. The rebaseline is unrelated
to this change but was needed in order to unskip the tests.

* platform/efl/TestExpectations:
* platform/efl/media/controls-after-reload-expected.png:
* platform/efl/media/controls-after-reload-expected.txt:
* platform/efl/media/controls-strict-expected.png:
* platform/efl/media/controls-strict-expected.txt:
* platform/efl/media/controls-styling-expected.png:
* platform/efl/media/controls-styling-expected.txt:
* platform/efl/media/controls-without-preload-expected.png:
* platform/efl/media/controls-without-preload-expected.txt:
* platform/efl/media/media-controls-clone-expected.png:
* platform/efl/media/media-controls-clone-expected.txt:
* platform/efl/media/media-document-audio-repaint-expected.txt:
* platform/efl/media/sources-fallback-codecs-expected.txt: Added.
* platform/efl/media/video-controls-rendering-expected.png:
* platform/efl/media/video-controls-rendering-expected.txt:
* platform/efl/media/video-display-toggle-expected.png:
* platform/efl/media/video-display-toggle-expected.txt:
* platform/efl/media/video-empty-source-expected.png:
* platform/efl/media/video-empty-source-expected.txt:
* platform/efl/media/video-zoom-controls-expected.png:
* platform/efl/media/video-zoom-controls-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reorder Qt WebCore includes
https://bugs.webkit.org/show_bug.cgi?id=97678

Reviewed by Noam Rosenthal.

* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_instance.h:
* bridge/qt/qt_pixmapruntime.cpp:
* bridge/qt/qt_runtime.cpp:
* platform/graphics/qt/FontCacheQt.cpp:
* platform/graphics/qt/FontCustomPlatformData.h:
* platform/graphics/qt/ImageDecoderQt.cpp:
* platform/graphics/qt/ImageDecoderQt.h:
* platform/graphics/qt/PathQt.cpp:
* platform/graphics/qt/TransformationMatrixQt.cpp:
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
* platform/network/qt/DnsPrefetchHelper.h:
* platform/network/qt/QNetworkReplyHandler.cpp:
* platform/network/qt/ResourceHandleQt.cpp:
* platform/qt/ClipboardQt.cpp:
* platform/qt/GamepadsQt.cpp:
* platform/qt/PasteboardQt.cpp:
* platform/qt/PlatformScreenQt.cpp:
* platform/qt/RenderThemeQt.cpp:
* platform/text/qt/TextBoundariesQt.cpp:
* plugins/qt/PluginPackageQt.cpp:
* plugins/qt/PluginViewQt.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION] Revision support problems: revert and apply original content  cause exceptions
https://bugs.webkit.org/show_bug.cgi?id=97669

Reviewed by Pavel Feldman.

Source/WebCore:

Added missed callback parameters.

Test: inspector/uisourcecode-revisions.html

* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.revertToOriginal):
(WebInspector.UISourceCode.prototype.revertAndClearHistory):

LayoutTests:

* inspector/uisourcecode-revisions-expected.txt: Added.
* inspector/uisourcecode-revisions.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=97662

Reviewed by Yury Semikhatsky.

Source/WebCore:

Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
Also we'd like to know exact pointers to strings and buffers for verification purposes.

* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorMemoryAgent.cpp:
(MemoryBlockName):
(WebCore):
(WebCore::collectDomTreeInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):

Source/WebKit/chromium:

Old schema used sizeInBytes method on StringImpl. This method works incorrect for substrings.
Also we'd like to know exact pointers to strings and buffers for verification purposes.

* tests/MemoryInstrumentationTest.cpp:
(WebCore::TEST):
(WebCore):

Source/WTF:

Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
Also we'd like to know exact pointers to strings and buffers for verification purposes.

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF):
(WTF::reportMemoryUsage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium expectations update.

* platform/chromium-win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:


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