Web Inspector: incorrect height of main timeline pane after switching to memory mode
https://bugs.webkit.org/show_bug.cgi?id=90387

Reviewed by Pavel Feldman.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._splitterDragging):
(WebInspector.TimelinePanel.prototype.set _setSplitterPosition):
(WebInspector.TimelinePanel.prototype._overviewModeChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: timeline events in the vicinity of event dividers some times are tricky to expand
https://bugs.webkit.org/show_bug.cgi?id=90572

Reviewed by Pavel Feldman.

- do not use resources-event-divider-padding;
- make dividers larger and use border-color to visualize them;
- move resources-<color>-divider to timelinePanel.css, as they're not used outside of timeline;

* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.createEventDivider):
* inspector/front-end/inspectorCommon.css:
* inspector/front-end/timelinePanel.css:
(.timeline .resources-event-divider):
(.resources-red-divider):
(.resources-blue-divider):
(.resources-orange-divider):
(.resources-divider.last):
(.timeline .resources-event-divider.timeline-frame-divider):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text Autosizing: Add test framework and simple test.
https://bugs.webkit.org/show_bug.cgi?id=90561

Source/WebCore:

Exposes methods allowing Layout Tests to enable Text Autosizing and
get the same results as if they were running on a mobile device.

Patch by John Mellor <johnme@chromium.org> on 2012-07-05
Reviewed by Adam Barth.

Test: fast/text-autosizing/simple-paragraph.html

* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore):
(WebCore::Settings::setTextAutosizingWindowSizeOverride):
* page/Settings.h:
(Settings):
(WebCore::Settings::textAutosizingWindowSizeOverride):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::boostSubtree):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setTextAutosizingEnabled):
(WebCore):
(WebCore::InternalSettings::setTextAutosizingWindowSizeOverride):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

ENABLE(TEXT_AUTOSIZING) is now on in Chromium (but disabled at runtime).
This allows it to be used in Layout Tests (and in future by Web
Inspector's mobile device emulation).

Patch by John Mellor <johnme@chromium.org> on 2012-07-05
Reviewed by Adam Barth.

* features.gypi:

LayoutTests:

Added a RefTest checking that Text Autosizing is active.
Skipped the text-autosizing test directory on platforms that
currently disable ENABLE(TEXT_AUTOSIZING).

Patch by John Mellor <johnme@chromium.org> on 2012-07-05
Reviewed by Adam Barth.

* fast/text-autosizing/simple-paragraph-expected.html: Added.
* fast/text-autosizing/simple-paragraph.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: added low-level instrumentation support for TimelineAgent
https://bugs.webkit.org/show_bug.cgi?id=90264

Patch by Sergey Rogulenko <rogulenko@google.com> on 2012-07-05
Reviewed by Pavel Feldman.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::timelineAgentForOrphanEvents):
(WebCore::InspectorInstrumentation::setTimelineAgentForOrphanEvents):
(WebCore::InspectorInstrumentation::threadSpecificTimelineAgentForOrphanEvents):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Clear m_currentInputEvent after handled by pointerLockMouseEvent().
https://bugs.webkit.org/show_bug.cgi?id=90391

Source/WebKit/chromium:

WebViewImpl::handleInputEvent was keeping a pointer to an input event that would
later be accessed. When in pointer lock, that pointer was not being cleared.
Code modified to use TemporaryChange to automatically clear the pointer at all
method exit points.

Reviewed by Abhishek Arya.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleInputEvent):

LayoutTests:

Test that reproduces bug 90391:
Enable pointer lock, receive mouse move, call window.open, don't crash.

Reviewed by Abhishek Arya.

* pointer-lock/bug90391-move-then-window-open-crash-expected.txt: Added.
* pointer-lock/bug90391-move-then-window-open-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Move Webkit1 before WebKit2 in the build order

Reviewed by Csaba Osztrogonác.

* WebKit.pro:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move search field to the bottom of the page.
https://bugs.webkit.org/show_bug.cgi?id=90610

Reviewed by Vsevolod Vlasov.

This is the first step in the Search/replace implementation. This change moves search
field from the inspector toolbar to the inspector view footer that is visible upon Cmd/Ctrl+F.

* English.lproj/localizedStrings.js:
* inspector/front-end/InspectorView.js:
(WebInspector.InspectorView):
(WebInspector.InspectorView.prototype._pushToHistory):
(WebInspector.InspectorView.prototype.panelsElement):
(WebInspector.InspectorView.prototype.setFooterElement):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.show):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._reset):
* inspector/front-end/SearchController.js:
(WebInspector.SearchController):
(WebInspector.SearchController.prototype.updateSearchLabel):
(WebInspector.SearchController.prototype.cancelSearch):
(WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
(WebInspector.SearchController.prototype.focusSearchField):
(WebInspector.SearchController.prototype._onKeyDown):
(WebInspector.SearchController.prototype._onNextButtonSearch):
(WebInspector.SearchController.prototype._onPrevButtonSearch):
(WebInspector.SearchController.prototype._performSearch):
* inspector/front-end/inspector.css:
(#search):
(.toolbar-search-container):
(.toolbar-search-navigation):
(.toolbar-search-navigation:hover):
(.toolbar-search-navigation.toolbar-search-navigation-prev):
(.toolbar-search-navigation.toolbar-search-navigation-next):
(.toolbar-search-navigation-hidden):
(.status-bar):
(.search-drawer-header input[type="search"].search-config-search):
(.inspector-footer):
(.inspector-footer > div):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector.get _setCompactMode):
(WebInspector.postDocumentKeyDown):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace
https://bugs.webkit.org/show_bug.cgi?id=88436

Reviewed by Brady Eidson.

Test: http/tests/multipart/multipart-replace-non-html-content.php

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load,
    rather than multiple times in a multipart load.
(WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is
    actually committed, and multipart data is often not committed until the part is finished. Check
    whether the SharedBuffer is non-null instead.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell
    was cleared as part of creation of a new Document. Check it before using it.

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=88436.

Reviewed by Brady Eidson.

* http/tests/multipart/multipart-replace-non-html-content-expected.txt: Added.
* http/tests/multipart/multipart-replace-non-html-content.php: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac][WK2] Enable HTTPS tests
https://bugs.webkit.org/show_bug.cgi?id=90600

Reviewed by Brady Eidson.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm: (dumpRenderTree): Removed a misleading comment.
It explained why we were doing this here instead of a frame load delegate, but that's
just history, not an explanation of why we need this code.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
Ignore certificate errors for localhost and 127.0.0.1. Since this is only needed
for tests, it seems appropriate to have platform specific solutions in every WTR,
and not add a WebKit2 API.

LayoutTests:

Unskip in common wk2 skipped file, re-skip everywhere besides Mac.

* platform/gtk-wk2/Skipped:
* platform/qt-5.0-wk2/Skipped:
* platform/win-wk2/Skipped:
* platform/wk2/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Fix some CMake warnings
https://bugs.webkit.org/show_bug.cgi?id=90558

Fix WebKit options so they match with FeatureList.pm.

Reviewed by Dan Bates.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding myself as committer to committers.py

Unreviewed.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121899.
http://trac.webkit.org/changeset/121899
https://bugs.webkit.org/show_bug.cgi?id=90623

Unauthorized WK2 API breakage (Requested by andersca on
#webkit).

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

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedURLAPI):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel layout broken with spans with CSS position other than static
https://bugs.webkit.org/show_bug.cgi?id=90097

Patch by Behdad Esfahbod <behdad@behdad.org> on 2012-07-05
Reviewed by Eric Seidel.

In InlineBox, don't truncate size to integers when returning.

In RenderBlock, don't round-up width to next integer.  Round-up to
next LayoutUnit instead.

Test: Added fast/sub-pixel/size-of-span-with-different-positions.html
Adjust expected outputs affected by the rounding changes.

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::fromFloatCeil):
(FractionalLayoutUnit):
* rendering/InlineBox.h:
(WebCore::InlineBox::size):
* rendering/RenderBlock.cpp:
(WebCore::updatePreferredWidth):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move cursor to the current search match.
https://bugs.webkit.org/show_bug.cgi?id=90621

Reviewed by Vsevolod Vlasov.

After closing the search dialog, the cursor should be at the latest search match location.

* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.markAndRevealRange):
(WebInspector.TextEditor.prototype._handleFocused):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Add C API for Battery Status API
https://bugs.webkit.org/show_bug.cgi?id=90545

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-05
Reviewed by Anders Carlsson.

Add C API for WKBatteryManager and WKBatteryStatus
so that clients can support the Battery Status API
in WebKit2.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/C/WKBatteryManager.cpp:
(WKBatteryManagerProviderDidChangeBatteryStatus):
(WKBatteryManagerProviderUpdateBatteryStatus):
* UIProcess/API/C/WKBatteryStatus.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKBatteryManager.cpp.
(WKBatteryStatusGetTypeID):
(WKBatteryStatusCreate):
* UIProcess/API/C/WKBatteryStatus.h: Copied from Source/WebKit2/UIProcess/API/C/WKBatteryManager.cpp.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text Autosizing: Add basic framework
https://bugs.webkit.org/show_bug.cgi?id=88655

Follow-up patch tweaking method signatures.

Patch by John Mellor <johnme@chromium.org> on 2012-07-05
Reviewed by Simon Fraser.

No functional change, so no new tests.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
(WebCore::TextAutosizer::processBlock):
(WebCore::TextAutosizer::processText):
(WebCore):
* rendering/TextAutosizer.h:
(TextAutosizer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Character iterators should not advance if they are at end
https://bugs.webkit.org/show_bug.cgi?id=90560

Reviewed by Ryosuke Niwa.

Source/WebCore:

CharacterIterator and BackwardsCharacterIterator try to advance their
internal TextIterator without checking if they already are at end.
This can cause crashes in TextIterator::advance.

Test: platform/chromium/editing/surrounding-text/surrounding-text.html

* editing/SurroundingText.cpp:
(WebCore::SurroundingText::SurroundingText):
* editing/TextIterator.cpp:
(WebCore::CharacterIterator::advance):
(WebCore::BackwardsCharacterIterator::advance):

LayoutTests:

Add a new test case where character iterators are already at end when
trying to advance. This was caught by Chromium's address sanitizer
here: http://code.google.com/p/chromium/issues/detail?id=135705

* platform/chromium/editing/surrounding-text/surrounding-text-expected.txt:
* platform/chromium/editing/surrounding-text/surrounding-text.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Create a WebKit::Web* wrapper for the cc animation classes
https://bugs.webkit.org/show_bug.cgi?id=90303

Reviewed by James Robinson.

Source/Platform:

* Platform.gypi:
* chromium/public/WebAnimation.h: Added.
(WebCore):
(WebKit):
(WebAnimation):
(WebKit::WebAnimation::WebAnimation):
(WebKit::WebAnimation::~WebAnimation):
* chromium/public/WebAnimationCurve.h: Added.
(WebCore):
(WebKit):
(WebAnimationCurve):
(WebKit::WebAnimationCurve::~WebAnimationCurve):
(WebKit::WebAnimationCurve::WebAnimationCurve):
* chromium/public/WebFloatAnimationCurve.h: Added.
(WebCore):
(WebKit):
(WebFloatAnimationCurve):
(WebKit::WebFloatAnimationCurve::WebFloatAnimationCurve):
(WebKit::WebFloatAnimationCurve::~WebFloatAnimationCurve):
* chromium/public/WebFloatKeyframe.h: Added.
(WebKit):
(WebKit::WebFloatKeyframe::WebFloatKeyframe):
(WebFloatKeyframe):
* chromium/public/WebTransformAnimationCurve.h: Added.
(WebCore):
(WebKit):
(WebTransformAnimationCurve):
(WebKit::WebTransformAnimationCurve::WebTransformAnimationCurve):
(WebKit::WebTransformAnimationCurve::~WebTransformAnimationCurve):
* chromium/public/WebTransformKeyframe.h: Added.
(WebKit):
(WebKit::WebTransformKeyframe::WebTransformKeyframe):
(WebTransformKeyframe):

Source/WebKit/chromium:

* WebKit.gyp:
* WebKit.gypi:
* src/WebAnimation.cpp: Added.
(WebKit):
(WebKit::WebAnimation::iterations):
(WebKit::WebAnimation::setIterations):
(WebKit::WebAnimation::startTime):
(WebKit::WebAnimation::setStartTime):
(WebKit::WebAnimation::timeOffset):
(WebKit::WebAnimation::setTimeOffset):
(WebKit::WebAnimation::alternatesDirection):
(WebKit::WebAnimation::setAlternatesDirection):
(WebKit::WebAnimation::toCCActiveAnimation):
(WebKit::WebAnimation::initialize):
(WebKit::WebAnimation::destroy):
* src/WebAnimationCurveCommon.cpp: Added.
(WebKit):
(WebKit::createTimingFunction):
* src/WebAnimationCurveCommon.h: Added.
(WebCore):
(WebKit):
* src/WebFloatAnimationCurve.cpp: Added.
(WebKit):
(WebKit::WebFloatAnimationCurve::add):
(WebKit::WebFloatAnimationCurve::toCCAnimationCurve):
(WebKit::WebFloatAnimationCurve::initialize):
(WebKit::WebFloatAnimationCurve::destroy):
* src/WebTransformAnimationCurve.cpp: Added.
(WebKit):
(WebKit::WebTransformAnimationCurve::add):
(WebKit::WebTransformAnimationCurve::toCCAnimationCurve):
(WebKit::WebTransformAnimationCurve::initialize):
(WebKit::WebTransformAnimationCurve::destroy):
* tests/WebAnimationTest.cpp: Added.
* tests/WebFloatAnimationCurveTest.cpp: Added.
* tests/WebTransformAnimationCurveTest.cpp: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Code refactoring: move mimeTypeFromUTITree to a separate file.
https://bugs.webkit.org/show_bug.cgi?id=90619

We should move UTI handling related code to a separate file.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2012-07-05
Reviewed by David Kilzer.

* WebCore.xcodeproj/project.pbxproj: Add UTIUtilities.h/UTIUtilities.mm to xcode project, and drive-by fix
    that happened when editing the Xcode project file.
* platform/network/mac/UTIUtilities.h: Added.
(WebCore):
* platform/network/mac/UTIUtilities.mm: Added.  move mimeTypeFromUTITree to UTIUtilities.mm.
(WebCore):
(WebCore::mimeTypeFromUTITree):
* platform/network/mac/WebCoreURLResponse.mm: include UTIUtilities.h to use mimeTypeFromUTITree.
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSObjectCallAsFunction should thisConvert the provided thisObject
https://bugs.webkit.org/show_bug.cgi?id=90628

Reviewed by Gavin Barraclough.

Perform this conversion on the provided this object.

* API/JSObjectRef.cpp:
(JSObjectCallAsFunction):

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