Delete text from password does nothing.
https://bugs.webkit.org/show_bug.cgi?id=92040

Patch by Sergio Carlos Morales Angeles <carloschilazo@gmail.com> on 2012-08-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

Use Editor::canDelete() to determine if field is editable or not.
Added password-delete-contents test.

Test: editing/deleting/password-delete-contents.html

* editing/EditorCommand.cpp:
(WebCore::enabledDelete):

LayoutTests:

Added regression test for password field content delete.

* editing/deleting/password-delete-contents-expected.txt: Added.
* editing/deleting/password-delete-contents.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[cmake] Cleanup FindHarfBuzz.cmake
https://bugs.webkit.org/show_bug.cgi?id=92984

Patch by Dominik Röttsches <dominik.rottsches@intel.com> on 2012-08-03
Reviewed by Hajime Morita.

Cleanup which didn't make it into my previous ptch.

* Source/cmake/FindHarfBuzz.cmake: Remove duplicate line, add a bit of documentation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore::DragController::cleanupAfterSystemDrag should null-check page
https://bugs.webkit.org/show_bug.cgi?id=61815

Reviewed by Eric Seidel.

* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::doSystemDrag):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: add CSSRule memory instrumentation
https://bugs.webkit.org/show_bug.cgi?id=92962

Reviewed by Pavel Feldman.

Added memory footprint reporting method to CSSRule and its descendants.

* css/CSSCharsetRule.cpp:
(WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSCharsetRule.h:
(CSSCharsetRule):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
(WebCore):
* css/CSSComputedStyleDeclaration.h:
(CSSComputedStyleDeclaration):
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSFontFaceRule.h:
(CSSFontFaceRule):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSImportRule.h:
(CSSImportRule):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSMediaRule.h:
(CSSMediaRule):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSPageRule.h:
(CSSPageRule):
* css/CSSRule.cpp:
(WebCore::CSSRule::reportMemoryUsage): we manually implement polymorphic
call here to avoid adding vtable pointer to all CSSRule objects. Descendants
are expected to report their memory via reportDescendantMemoryUsage. The name
is intentionally different from reportMemoryUsage to avoid accidential infitite
recursion: if the descendants overrode non-virtual CSSRule::reportMemoryUsage,
it would be easy to add a new descendant type to the switch in
CSSRule::reportMemoryUsage without providing proper override for reportMemoryUsage
and CSSRule::reportMemoryUsage would end up calling itself.
(WebCore):
(WebCore::CSSRule::reportBaseClassMemoryUsage): again we cannot use
MemoryClassInfo::visitBaseClass like we do for virtual methods because it would
lead to a recursive call of CSSRule::reportMemoryUsage. This is why we use
reportBaseClassMemoryUsage to allow descendants to report objects referenced
from their base class.
* css/CSSRule.h:
(WebCore):
(CSSRule):
* css/CSSRuleList.cpp:
(WebCore::StaticCSSRuleList::reportMemoryUsage):
(WebCore):
* css/CSSRuleList.h:
(WebCore):
(CSSRuleList):
(StaticCSSRuleList):
(LiveCSSRuleList):
* css/CSSStyleDeclaration.h:
(WebCore):
(CSSStyleDeclaration):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::reportDescendantMemoryUsage):
(WebCore):
* css/CSSStyleRule.h:
(CSSStyleRule):
* css/CSSStyleSheet.cpp:
(StyleSheetCSSRuleList):
(WebCore::CSSStyleSheet::reportMemoryUsage):
* css/CSSUnknownRule.h:
(CSSUnknownRule):
(WebCore::CSSUnknownRule::reportDescendantMemoryUsage):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
(WebCore):
(WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
(WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
* css/PropertySetCSSStyleDeclaration.h:
(PropertySetCSSStyleDeclaration):
(StyleRuleCSSStyleDeclaration):
(InlineCSSStyleDeclaration):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
(WebCore):
* css/WebKitCSSKeyframeRule.h:
(WebKitCSSKeyframeRule):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
(WebCore):
* css/WebKitCSSKeyframesRule.h:
(WebKitCSSKeyframesRule):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
(WebCore):
* css/WebKitCSSRegionRule.h:
(WebKitCSSRegionRule):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Incorrect blob url href when inspecting
https://bugs.webkit.org/show_bug.cgi?id=93076

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Special-cased the "blob" scheme to return the original URL intact on completion.

* inspector/front-end/ResourceUtils.js:
(WebInspector.completeURL):

LayoutTests:

* inspector/styles/styles-url-linkify-expected.txt:
* inspector/styles/styles-url-linkify.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Profiles: extract save to file / load from code
https://bugs.webkit.org/show_bug.cgi?id=92348

Patch by Eugene Klyuchnikov <eustas.big@gmail.com> on 2012-08-03
Reviewed by Yury Semikhatsky.

Source/WebCore:

Motivation: extract reusable code for timeline load/save.
FileUtils.js will contain common code. Not all code moved to FileUtils
to make review easier. This code will be moved in next patch.

Core abstractions: OutputStream and OutputStreamDelegate.

OutputStream is interface that is used to transfer entity divded
to chunks. Transfer process is explicitly initialized (startTransfer)
and finalized (finishTrnsfer).

OutputStreamDelegate is interface to receive notifications about
transfer process: onTransferStarted, onChunkTransferred, onTransferFinished.

ChunkedFileReader: utility class that loads file by chunks of specified
size and notifies given delegate. OutputStream is supplied as a
parameter of method "start".

ChunkedFileWriter: implementation of OutputStream that saves data
to file specified by file name and notifies given delegate.

* WebCore.gypi: Added 'FileUtils.js'.
* WebCore.vcproj/WebCore.vcproj: Added 'FileUtils.js'.
* inspector/compile-front-end.py: Added 'FileUtils.js'.
* inspector/front-end/FileUtils.js: Added.
(WebInspector.OutputStreamDelegate): Added.
(WebInspector.ChunkedFileReader): Added.
(WebInspector.createFileSelectorElement): Added utility method to construct
hidden input element to select file.
* inspector/front-end/HeapSnapshotLoader.js: Adopted new API.
* inspector/front-end/HeapSnapshotProxy.js: Adopted new API.
* inspector/front-end/HeapSnapshotView.js: Adopted new API.
(WebInspector.HeapSnapshotLoadFromFileDelegate):
Extracted from existing code.
(WebInspector.ChunkedFileWriter): Renamed and refactored.
(WebInspector.HeapSnapshotSaveToFileDelegate):
Extracted from existing code.
* inspector/front-end/ProfilesPanel.js: Adopted new API.

LayoutTests:

Changed test to adopt new API. Replaced FS mock with
reader mock.

* inspector/profiler/heap-snapshot-loader.html:
Adopted new API.

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