Have Vector::capacity() return an unsigned instead of a size_t
https://bugs.webkit.org/show_bug.cgi?id=138842

Reviewed by Andreas Kling.

Source/WebCore:

Update the code base now that Vector::capacity() returns an unsigned
type instead of a size_t.

No new tests, no behavior change.

* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

Source/WTF:

Have Vector::capacity() return an unsigned instead of a size_t as
capacity is stored as an unsigned internally.

* wtf/Vector.h:
(WTF::Vector::capacity):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid synchronous style recalc in Document.activeElement
<https://webkit.org/b/138850>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This subtly changes the behavior of <input autofocus>, which was caught by
a layout test. Auto-focus doesn't happen until the render tree is attached,
although it was possible to force it by accessing document.activeElement.

Now auto-focus is always lazy. This is consistent with other browser engines.

~1% progression on Speedometer locally.

* dom/Document.cpp:
(WebCore::Document::activeElement):

LayoutTests:

Tweak a test to run once the DOM is loaded instead of during parsing.

* fast/forms/autofocus-in-sandbox-with-allow-scripts.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
https://bugs.webkit.org/show_bug.cgi?id=137590

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/block/selection-block-gaps-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps):
Check that we really are a RenderBlock before recurring.

LayoutTests:

* fast/block/selection-block-gap-crash-expected.txt: Added.
* fast/block/selection-block-gap-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Invoking dictionary lookup on text in some search fields searches for 
incorrect item
https://bugs.webkit.org/show_bug.cgi?id=138853
-and corresponding-
rdar://problem/18912505

Reviewed by Tim Horton.

Get the visible position based on the frame, not just the renderer.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a setting to toggle DOMTimer throttling support
https://bugs.webkit.org/show_bug.cgi?id=138844
<rdar://problem/19020874>

Reviewed by Andreas Kling.

Add a setting to disable DOM timers throttling, in order to help
developers determine if a specific issue is caused by timer
throttling.

Source/WebCore:

* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::contextDocument):
(WebCore::DOMTimerFireState::scriptMadeUserObservableChanges):
(WebCore::DOMTimer::isDOMTimersThrottlingEnabled):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
* page/DOMTimer.h:
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences domTimersThrottlingEnabled]):
(-[WebPreferences setDOMTimersThrottlingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDOMTimersThrottlingEnabled):
(WKPreferencesGetDOMTimersThrottlingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r176263 and r176273.
https://bugs.webkit.org/show_bug.cgi?id=138854

Underlines are hideous. (Requested by litherum on #webkit).

Reverted changesets:

"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263

"iOS build fix."
http://trac.webkit.org/changeset/176273

Patch by Commit Queue <commit-queue@webkit.org> on 2014-11-18# Please enter the commit message for your changes. Lines starting

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