WebKit-https.git
5 years agoUnreviewed, rolling out r170337.
commit-queue@webkit.org [Tue, 24 Jun 2014 14:24:05 +0000 (14:24 +0000)]
Unreviewed, rolling out r170337.
https://bugs.webkit.org/show_bug.cgi?id=134250

caused 3 layout tests to crash on debug. (Requested by zalan
on #webkit).

Reverted changeset:

"Use unsigneds instead of ints for indexes into a string in
text layout code"
https://bugs.webkit.org/show_bug.cgi?id=133592
http://trac.webkit.org/changeset/170337

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

5 years agoSource/WebCore: [ATK] Don't ignore links rendered as blocks.
commit-queue@webkit.org [Tue, 24 Jun 2014 11:09:22 +0000 (11:09 +0000)]
Source/WebCore: [ATK] Don't ignore links rendered as blocks.
https://bugs.webkit.org/show_bug.cgi?id=130941

Patch by Jarek Czekalski <jarekczek@poczta.onet.pl> on 2014-06-24
Reviewed by Mario Sanchez Prada.

* /m/usr/src/webkit-trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(WebCore::AccessibilityObject::objectFocusedAndCaretOffsetUnignored): Don't ignore links
when they are renderered with display:block.

LayoutTests: [ATK] Extended the test for accessibility of text inside "span" block in "a" block
with the tests for caret movements in these cases.
https://bugs.webkit.org/show_bug.cgi?id=130941

Patch by Jarek Czekalski <jarekczek@poczta.onet.pl> on 2014-06-24
Reviewed by Mario Sanchez Prada.

* platform/gtk/accessibility/text-in-span-block-in-a-block-expected.txt:
* platform/gtk/accessibility/text-in-span-block-in-a-block.html:
Added testing for text-caret-moved signal. Added one more "a" element to the set.

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

5 years agoREGRESSION(r170235): Remove incorrect ifdef guard
commit-queue@webkit.org [Tue, 24 Jun 2014 11:02:42 +0000 (11:02 +0000)]
REGRESSION(r170235): Remove incorrect ifdef guard
https://bugs.webkit.org/show_bug.cgi?id=134246

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-24
Reviewed by Csaba Osztrogonác.

* WebView/WebView.mm:
(-[WebView _visibilityState]):

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

5 years agoName moving. Unreviewed.
jfernandez@igalia.com [Tue, 24 Jun 2014 10:09:22 +0000 (10:09 +0000)]
Name moving. Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

5 years agoRemove EFL WK1 watch category
gyuyoung.kim@samsung.com [Tue, 24 Jun 2014 09:22:00 +0000 (09:22 +0000)]
Remove EFL WK1 watch category
https://bugs.webkit.org/show_bug.cgi?id=134231

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/config/watchlist: Removed EFL WK1 category.

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

5 years agoUnreviewed. Update GObject DOM bindings test results after r170351.
carlosgc@webkit.org [Tue, 24 Jun 2014 09:15:21 +0000 (09:15 +0000)]
Unreviewed. Update GObject DOM bindings test results after r170351.

* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:

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

5 years ago[EFL] Merge efl-wk2 and efl test expectations files
m.pakula@samsung.com [Tue, 24 Jun 2014 09:02:18 +0000 (09:02 +0000)]
[EFL] Merge efl-wk2 and efl test expectations files
https://bugs.webkit.org/show_bug.cgi?id=134245

Unreviewed gardening after removing WebKit1.

* platform/efl-wk2/TestExpectations: An empty file left, as deleting it may break flakiness dashboard.
* platform/efl/TestExpectations: Merged with platform/efl-wk2/TestExpectations.

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

5 years ago[JavaScriptCore] Enable concurrent JIT on EFL.
llango.u-szeged@partner.samsung.com [Tue, 24 Jun 2014 08:36:34 +0000 (08:36 +0000)]
[JavaScriptCore] Enable concurrent JIT on EFL.
https://bugs.webkit.org/show_bug.cgi?id=134242

Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

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

5 years ago[ATK] Remove some unused code from DumpRenderTree
k.czech@samsung.com [Tue, 24 Jun 2014 08:09:21 +0000 (08:09 +0000)]
[ATK] Remove some unused code from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=134191

Reviewed by Chris Fleizach.

DumpRenderTree's accessibility code could be removed since GTK and EFL has stopped supporting WK1.

* DumpRenderTree/atk/AccessibilityCallbacks.h: Removed.
* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp: Removed.
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp: Removed.
* DumpRenderTree/atk/AccessibilityNotificationHandlerAtk.cpp: Removed.
* DumpRenderTree/atk/AccessibilityNotificationHandlerAtk.h: Removed.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: Removed.

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

5 years agoUnreviewed. Fix GTK+ build after r170309.
carlosgc@webkit.org [Tue, 24 Jun 2014 07:14:43 +0000 (07:14 +0000)]
Unreviewed. Fix GTK+ build after r170309.

Skip functions returning arrays in GObject DOM bindings.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):

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

5 years agoDrop the cross organizational support requirement from reviewer nomination policy
rniwa@webkit.org [Tue, 24 Jun 2014 06:55:21 +0000 (06:55 +0000)]
Drop the cross organizational support requirement from reviewer nomination policy
https://bugs.webkit.org/show_bug.cgi?id=134240

Reviewed by Gyuyoung Kim.

Removed.

* coding/commit-review-policy.html:

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

5 years ago[EFL][WK2] Search field is not shown properly on doing ctrl+f on Minibrowser.
commit-queue@webkit.org [Tue, 24 Jun 2014 06:34:21 +0000 (06:34 +0000)]
[EFL][WK2] Search field is not shown properly on doing ctrl+f on Minibrowser.
https://bugs.webkit.org/show_bug.cgi?id=134025

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-06-23
Reviewed by Gyuyoung Kim.

Use EVAS_HINT_FILL in evas_object_size_hint_align_set() api.

* MiniBrowser/efl/main.c:
(window_create):

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

5 years agoUnreviewed, fix build warning.
ljaehun.lim@samsung.com [Tue, 24 Jun 2014 06:15:25 +0000 (06:15 +0000)]
Unreviewed, fix build warning.

Source/WebKit2/WebProcess/WebPage/DrawingArea.h:117:18: warning: unused parameter ‘wantsDidUpdateViewState’ [-Wunused-parameter]

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):

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

5 years ago[EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
ryuan.choi@samsung.com [Tue, 24 Jun 2014 06:12:02 +0000 (06:12 +0000)]
[EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
https://bugs.webkit.org/show_bug.cgi?id=134236

Reviewed by Gyuyoung Kim.

Source/WebCore:
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
* platform/efl/RenderThemeEfl.h:
* platform/graphics/efl/CairoUtilitiesEfl.cpp:
(WebCore::evasObjectFromCairoImageSurface):
* platform/graphics/efl/CairoUtilitiesEfl.h:
* platform/graphics/efl/ImageEfl.cpp:
(WebCore::BitmapImage::getEvasObject):

Source/WebKit2:
* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/SnapshotImageGL.cpp:
* UIProcess/API/efl/ewk_favicon_database.cpp:
(ewk_favicon_database_icon_get):
* UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp: Removed.

Source/WTF:
Although there are ref/unref for Evas_Object, it's bit odd so we should call evas_object_del to destroy it.
So, this patch replaced RefPtr<Evas_Object> with UniquePtrEfl for the simplicity.

* wtf/PlatformEfl.cmake: Removed RefPtrEfl.cpp from source list.
* wtf/efl/RefPtrEfl.cpp: Removed.
* wtf/efl/RefPtrEfl.h: Removed.

Tools:
* ImageDiff/efl/ImageDiff.cpp:
(calculateDifference):
(printImageDifferences):
(readImageFromStdin):
(main):

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

5 years agoRolling out r170340 and r170339.
dbates@webkit.org [Tue, 24 Jun 2014 05:45:54 +0000 (05:45 +0000)]
Rolling out r170340 and r170339.

Changeset r170339 broke the Apple Windows Debug and Release builds.

Reverted changesets:

"[Win] Build fix after r134209"
http://trac.webkit.org/changeset/170340

"[Win] Clean up and refactor WinLauncher"
https://bugs.webkit.org/show_bug.cgi?id=134209
http://trac.webkit.org/changeset/170339

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

5 years agoChapter forward/backward should seek to beginning/end.
commit-queue@webkit.org [Tue, 24 Jun 2014 04:38:17 +0000 (04:38 +0000)]
Chapter forward/backward should seek to beginning/end.
https://bugs.webkit.org/show_bug.cgi?id=134225

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-06-23
Reviewed by Eric Carlson.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController seekChapterBackward:]): forwards to -seekToBeginning
(-[WebAVPlayerController seekChapterForward:]): forwards to -seekToEnd

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

5 years ago[iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
dbates@webkit.org [Tue, 24 Jun 2014 04:12:58 +0000 (04:12 +0000)]
[iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
https://bugs.webkit.org/show_bug.cgi?id=134219
<rdar://problem/17279113>

Reviewed by Benjamin Poulain.

Fixes an issue where typing into a text field may cause a noticeable jump to the top of
the page.

Currently when updating the visual content rectangles we always constrain the scroll offset
(s_x, s_y) such that 0 <= s_x <= "content width" - "visible width" and 0 <= s_y <= "content height" - "visible height".
However the UIProcess may want to scroll the page by an offset outside of this range to
create a visually pleasing result. In particular, on iOS we may scroll the page slightly
outside of this range (e.g. s_y > 0 = "content height" - "visible height") when a form
control is focused so as to be consistent with platform convention.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Temporarily disable content edge constraint when
updating scroll offset.

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

5 years ago[Mac] Don't draw focus rings if we are animating controls
dino@apple.com [Tue, 24 Jun 2014 02:24:12 +0000 (02:24 +0000)]
[Mac] Don't draw focus rings if we are animating controls
https://bugs.webkit.org/show_bug.cgi?id=134232
<rdar://problem/17381121>

Reviewed by Tim Horton.

Controls in native apps do not draw their focus rings as they
animate (in Yosemite). Turn this off for WebKit too. It turns
out that when we were drawing them, they were in the wrong
place anyway.

Since we don't animate controls when testing, we can't really test this.

* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton): Only draw the focus ring if the
NSButtonCell is not animating.

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

5 years ago[ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
k.czech@samsung.com [Tue, 24 Jun 2014 02:18:39 +0000 (02:18 +0000)]
[ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
https://bugs.webkit.org/show_bug.cgi?id=134193

Reviewed by Gyuyoung Kim.

It was used along with DRT. Since we have stopped support WK1/DRT, it won't be needed.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetFocusedElement): Deleted.
* accessibility/atk/WebKitAccessibleWrapperAtk.h:

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

5 years ago<rdar://problem/17413374> [iOS] Application cache size per origin is not limited
mitz@apple.com [Tue, 24 Jun 2014 01:23:08 +0000 (01:23 +0000)]
<rdar://problem/17413374> [iOS] Application cache size per origin is not limited
https://bugs.webkit.org/show_bug.cgi?id=134229

Reviewed by Anders Carlsson.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess): Set the default quota per origin to the same
value it is set in Legacy WebKit.

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

5 years ago[Win] Build fix after r134209
bfulgham@apple.com [Tue, 24 Jun 2014 00:56:43 +0000 (00:56 +0000)]
[Win] Build fix after r134209

* WinLauncher/WinMain.cpp: Must include the resources file
before Common.cpp.

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

5 years ago[Win] Clean up and refactor WinLauncher
bfulgham@apple.com [Tue, 24 Jun 2014 00:51:58 +0000 (00:51 +0000)]
[Win] Clean up and refactor WinLauncher
https://bugs.webkit.org/show_bug.cgi?id=134209

Reviewed by Tim Horton.

Make WinLauncher a class, and move all non-class driver functions
into "Common.cpp" and "WinMain.cpp". These files are distinct
to allow some internal tools to reuse the code in 'Common'.

* WinLauncher/Common.cpp: Added. Consists of code moved from
'WinLauncher.cpp' that can be reused for other tools.
(subclassForLayeredWindow):
(computeFullDesktopFrame):
(DllMain):
(getAppDataFolder):
(setCacheFolder):
(createCrashReport):
(AbortProc):
(getPrinterDC):
(initDocStruct):
(PrintView):
(ToggleMenuItem):
(WndProc):
(EditProc):
(BackButtonProc):
(ForwardButtonProc):
(About):
(loadURL):
(dllLauncherEntryPoint):
* WinLauncher/DOMDefaultImpl.cpp: Copied from WinLauncher/DOMDefaultImpl.h.
(DOMEventListener::Release):
(WebScriptObject::WebScriptObject): Deleted.
(WebScriptObject::~WebScriptObject): Deleted.
(WebScriptObject::throwException): Deleted.
(WebScriptObject::callWebScriptMethod): Deleted.
(WebScriptObject::evaluateWebScript): Deleted.
(WebScriptObject::removeWebScriptKey): Deleted.
(WebScriptObject::stringRepresentation): Deleted.
(WebScriptObject::webScriptValueAtIndex): Deleted.
(WebScriptObject::setWebScriptValueAtIndex): Deleted.
(WebScriptObject::setException): Deleted.
(DOMEventListener::throwException): Deleted.
(DOMEventListener::callWebScriptMethod): Deleted.
(DOMEventListener::evaluateWebScript): Deleted.
(DOMEventListener::removeWebScriptKey): Deleted.
(DOMEventListener::stringRepresentation): Deleted.
(DOMEventListener::webScriptValueAtIndex): Deleted.
(DOMEventListener::setWebScriptValueAtIndex): Deleted.
(DOMEventListener::setException): Deleted.
(DOMEventListener::handleEvent): Deleted.
* WinLauncher/DOMDefaultImpl.h:
(WebScriptObject::QueryInterface): Deleted.
(WebScriptObject::AddRef): Deleted.
(WebScriptObject::Release): Deleted.
(DOMObject::QueryInterface): Deleted.
(DOMEventListener::QueryInterface): Deleted.
(DOMEventListener::AddRef): Deleted.
(DOMEventListener::Release): Deleted.
* WinLauncher/WinLauncher.cpp: Converted stand-alone implementation
into a C++ class and removed WinAPI code.
(WinLauncher::WinLauncher):
(WinLauncher::init):
(WinLauncher::prepareViews):
(WinLauncher::setFrameLoadDelegate):
(WinLauncher::setUIDelegate):
(WinLauncher::setAccessibilityDelegate):
(WinLauncher::mainFrame):
(WinLauncher::seedInitialDefaultPreferences):
(WinLauncher::setToDefaultPreferences):
(updateMenuItemForHistoryItem):
(WinLauncher::showLastVisitedSites):
(WinLauncher::launchInspector):
(WinLauncher::navigateForwardOrBackward):
(WinLauncher::navigateToHistory):
(WinLauncher::goBack):
(WinLauncher::goForward):
(WinLauncher::loadURL):
(shouldUseFullDesktop): Deleted.
(SimpleEventListener::SimpleEventListener): Deleted.
(SimpleEventListener::handleEvent): Deleted.
(WinLauncherWebHost::updateAddressBar): Deleted.
(WinLauncherWebHost::didFailProvisionalLoadWithError): Deleted.
(WinLauncherWebHost::QueryInterface): Deleted.
(WinLauncherWebHost::AddRef): Deleted.
(WinLauncherWebHost::Release): Deleted.
(showLastVisitedSites): Deleted.
(WinLauncherWebHost::didFinishLoadForFrame): Deleted.
(resizeSubViews): Deleted.
(subclassForLayeredWindow): Deleted.
(computeFullDesktopFrame): Deleted.
(DllMain): Deleted.
(getAppDataFolder): Deleted.
(setToDefaultPreferences): Deleted.
(setCacheFolder): Deleted.
(createCrashReport): Deleted.
(wWinMain): Deleted.
(MyRegisterClass): Deleted.
(AbortProc): Deleted.
(getPrinterDC): Deleted.
(initDocStruct): Deleted.
(PrintView): Deleted.
(ToggleMenuItem): Deleted.
(LaunchInspector): Deleted.
(NavigateForwardOrBackward): Deleted.
(NavigateToHistory): Deleted.
(WndProc): Deleted.
(EditProc): Deleted.
(BackButtonProc): Deleted.
(ForwardButtonProc): Deleted.
(About): Deleted.
(loadURL): Deleted.
(dllLauncherEntryPoint): Deleted.
* WinLauncher/WinLauncher.h: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters:
* WinLauncher/WinLauncherReplace.h:
(processCrashReport):
* WinLauncher/WinLauncherWebHost.cpp: Added.
(SimpleEventListener::SimpleEventListener):
(SimpleEventListener::handleEvent):
(WinLauncherWebHost::updateAddressBar):
(WinLauncherWebHost::didFailProvisionalLoadWithError):
(WinLauncherWebHost::QueryInterface):
(WinLauncherWebHost::AddRef):
(WinLauncherWebHost::Release):
(WinLauncherWebHost::didFinishLoadForFrame):
* WinLauncher/WinLauncherWebHost.h: Copied from WinLauncher/WinLauncher.h.
Moved WinLauncherWebHost implementation from WinLauncher.cpp into
its own set of files.
(WinLauncherWebHost::WinLauncherWebHost):
(WinLauncherWebHost::didStartProvisionalLoadForFrame):
(WinLauncherWebHost::didReceiveServerRedirectForProvisionalLoadForFrame):
(WinLauncherWebHost::didCommitLoadForFrame):
(WinLauncherWebHost::didReceiveTitle):
(WinLauncherWebHost::didChangeIcons):
(WinLauncherWebHost::didReceiveIcon):
(WinLauncherWebHost::didFailLoadWithError):
(WinLauncherWebHost::didChangeLocationWithinPageForFrame):
(WinLauncherWebHost::willPerformClientRedirectToURL):
(WinLauncherWebHost::didCancelClientRedirectForFrame):
(WinLauncherWebHost::willCloseFrame):
(WinLauncherWebHost::windowScriptObjectAvailable):
(WinLauncherWebHost::didClearWindowObject):
* WinLauncher/WinMain.cpp: Added. This consists of code from
WinLauncher that is unique to the WinLauncher utility, and is
not part of the WinLauncher class.
(wWinMain):
(MyRegisterClass):

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

5 years agoUnreviewed, EFL build fix after r170330.
ryuan.choi@samsung.com [Tue, 24 Jun 2014 00:49:59 +0000 (00:49 +0000)]
Unreviewed, EFL build fix after r170330.

* WebProcess/WebPage/WebPage.cpp: Guard WKStringCF.h with PLATFORM(COCOA) macro.

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

5 years agoUse unsigneds instead of ints for indexes into a string in text layout code
mmaxfield@apple.com [Tue, 24 Jun 2014 00:29:44 +0000 (00:29 +0000)]
Use unsigneds instead of ints for indexes into a string in text layout code
https://bugs.webkit.org/show_bug.cgi?id=133592

Reviewed by Zalan Bujtas.

Migrate much of the text-handling code to use unsigneds for indexes into a string.

No new tests because there is no behavior change.

* WebCore.exp.in:
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForText):
(WebCore::computeUnderlineType):
* platform/graphics/Font.h:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawEmphasisMarksForSimpleText):
(WebCore::Font::drawGlyphBuffer):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForSimpleText):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::size):
(WebCore::GlyphBuffer::glyphs):
(WebCore::GlyphBuffer::advances):
(WebCore::GlyphBuffer::fontDataAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::offsetAt):
(WebCore::GlyphBuffer::reverse):
(WebCore::GlyphBuffer::offsetInString):
(WebCore::GlyphBuffer::swap):
* platform/graphics/GraphicsContext.cpp:
(WebCore::TextRunIterator::atEnd):
* platform/graphics/Latin1TextIterator.h:
(WebCore::Latin1TextIterator::Latin1TextIterator):
(WebCore::Latin1TextIterator::currentCharacter):
* platform/graphics/SimpleFontData.h:
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
* platform/graphics/SurrogatePairAwareTextIterator.h:
(WebCore::SurrogatePairAwareTextIterator::currentCharacter):
* platform/graphics/TextRun.h:
(WebCore::TextRun::length):
(WebCore::TextRun::charactersLength):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::glyphDataForCharacter):
(WebCore::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::advanceOneCharacter):
* platform/graphics/WidthIterator.h:
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::adjustSelectionRectForComplexText):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setNormalizedBuffer):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontWin.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::Font::drawGlyphs):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::selectionRectForComplexText):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::selectionState):
(WebCore::adjustCharactersAndLengthForHyphen):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::getStringToRender):
* rendering/RenderCombineText.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::positionForOffset):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
(WebCore::SVGTextMetricsBuilder::advance):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
(WebCore::SVGTextQuery::subStringLengthCallback):
(WebCore::SVGTextQuery::startPositionOfCharacterCallback):
(WebCore::SVGTextQuery::endPositionOfCharacterCallback):
(WebCore::SVGTextQuery::rotationOfCharacterCallback):
(WebCore::SVGTextQuery::extentOfCharacterCallback):
(WebCore::SVGTextQuery::characterNumberAtPositionCallback):
* rendering/svg/SVGTextQuery.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
* rendering/svg/SVGTextRunRenderingContext.h:
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
* svg/SVGFontData.h:

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

5 years agoHTMLMediaElement seek algorithm should allow cancelling previous seeks.
jer.noble@apple.com [Tue, 24 Jun 2014 00:08:25 +0000 (00:08 +0000)]
HTMLMediaElement seek algorithm should allow cancelling previous seeks.
https://bugs.webkit.org/show_bug.cgi?id=134116

Reviewed by Eric Carlson.

Source/WebCore:
Test: media/video-seek-double.html

Fulfill the requirement of the §4.7.14.9 seeking algorithm to do steps 5+ asynchronously and cancel
previous instances of the algorithm.

For the html/ parts of the algorithm, implement this by adding a seek timer, which when fired will
issue steps 5-12. MediaPlayerPrivateAVFoundation will already coalesce multiple seek operations, so nothing
additional needs be done there.  However, MediaPlayerPrivateMediaSourceAVFObjC needs to implement the same
pending seek logic in case additional seeks were issued after the html/ algorithm reached step 12.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the new m_seekTimer.
(WebCore::HTMLMediaElement::parseAttribute): Clear the seek timer.
(WebCore::HTMLMediaElement::seekInternal): Differentiate between DOM seeks and internal seeks.
(WebCore::HTMLMediaElement::seekWithTolerance:) Split into the seekTimerFired() method.
(WebCore::HTMLMediaElement::seekTimerFired:) Added, split from seekWithTolerance().
* html/HTMLMediaElement.h:
* html/MediaController.cpp:
(MediaController::bringElementUpToSpeed): Call seekInternal().
(WebCore::HTMLMediaElement::PendingSeek::PendingSeek): Added convenience struct for storing seek requests.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::PendingSeek::PendingSeek): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Modify the time jumped
    handler to not clear the m_seeking flag if another seek request is pending.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

LayoutTests:
* media/video-seek-double-expected.txt: Added.
* media/video-seek-double.html: Added.

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

5 years ago[WK2] Use the page background color instead of white when swipe snapshots were purged...
timothy_horton@apple.com [Tue, 24 Jun 2014 00:03:15 +0000 (00:03 +0000)]
[WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
https://bugs.webkit.org/show_bug.cgi?id=134218
<rdar://problem/17426454>

Reviewed by Benjamin Poulain.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView WebKit::]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::retrieveSnapshotForItem): Deleted.
* UIProcess/mac/ViewSnapshotStore.h:
Store a color along with each snapshot.
Set the background color of the swipe snapshot layer accordingly.

* WebCore.exp.in:

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

5 years agoAdd -[WKBackForwardList _removeAllItems]
andersca@apple.com [Mon, 23 Jun 2014 23:56:51 +0000 (23:56 +0000)]
Add -[WKBackForwardList _removeAllItems]
https://bugs.webkit.org/show_bug.cgi?id=134227
<rdar://problem/17291623>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList _removeAllItems]):
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[iOS] remove InbandTextTrackPrivateAVFIOS
eric.carlson@apple.com [Mon, 23 Jun 2014 23:45:01 +0000 (23:45 +0000)]
[iOS] remove InbandTextTrackPrivateAVFIOS
https://bugs.webkit.org/show_bug.cgi?id=134220

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj: Remove references to InbandTextTrackPrivateAVFIOS.

* platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Removed.
* platform/graphics/ios/InbandTextTrackPrivateAVFIOS.mm: Removed.

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

5 years agoUnreviewed, rolling out r170323.
commit-queue@webkit.org [Mon, 23 Jun 2014 23:17:00 +0000 (23:17 +0000)]
Unreviewed, rolling out r170323.
https://bugs.webkit.org/show_bug.cgi?id=134224

lots of build breakage (Requested by bradeeoh on #webkit).

Reverted changeset:

"[Mac] process raw VTT in-band captions"
https://bugs.webkit.org/show_bug.cgi?id=134178
http://trac.webkit.org/changeset/170323

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

5 years ago<rdar://problem/17413498> [Cocoa] Expose WebPreferences::offlineWebApplicationCacheEn...
mitz@apple.com [Mon, 23 Jun 2014 23:16:09 +0000 (23:16 +0000)]
<rdar://problem/17413498> [Cocoa] Expose WebPreferences::offlineWebApplicationCacheEnabled
https://bugs.webkit.org/show_bug.cgi?id=134217

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _offlineApplicationCacheIsEnabled]):
(-[WKPreferences _setOfflineApplicationCacheIsEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added _offlineWebApplicationCacheIsEnabled
property.

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

5 years agoAdd SPI for Injected Bundle to provide user agent for a given URL.
commit-queue@webkit.org [Mon, 23 Jun 2014 23:15:10 +0000 (23:15 +0000)]
Add SPI for Injected Bundle to provide user agent for a given URL.
https://bugs.webkit.org/show_bug.cgi?id=133562

Patch by Grant Kennell <gkennell@apple.com> on 2014-06-23
Reviewed by Sam Weinig.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
  Added delegate method to WebProcess PluIn protocol to provide UserAgent per URL.
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
  Added new typedef for function pointer for this new delegate call.
  Added new version (V8) of bundle loader client struct containing
  a function pointer of that new type.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(userAgentForURL): Makes delegate call with the new method.
(setUpPageLoaderClient): Sets the struct's new function pointer to the new method.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::userAgent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userAgent): Began using the new API to ask for user agent
  instead of simply returning what had been stored.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userAgent): Deleted.

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

5 years agoUnreviewed, rolling out r170324.
commit-queue@webkit.org [Mon, 23 Jun 2014 23:13:42 +0000 (23:13 +0000)]
Unreviewed, rolling out r170324.
https://bugs.webkit.org/show_bug.cgi?id=134223

lots of build breakage (Requested by bradeeoh on #webkit).

Reverted changeset:

"Unreviewed, revert an unintentional change committed with
r170323."
http://trac.webkit.org/changeset/170324

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

5 years agoFix release build
jpfau@apple.com [Mon, 23 Jun 2014 23:12:27 +0000 (23:12 +0000)]
Fix release build

* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::canRunTransaction):

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

5 years agoDatabase process crashes when multiple transactions attempt to run at once
jpfau@apple.com [Mon, 23 Jun 2014 22:38:47 +0000 (22:38 +0000)]
Database process crashes when multiple transactions attempt to run at once
https://bugs.webkit.org/show_bug.cgi?id=134139

Reviewed by David Kilzer.

Source/WebCore:
Ensure that only one transaction can be running at a time.

Test: storage/indexeddb/transaction-overlapping.html

* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::canRunTransaction):

LayoutTests:
* storage/indexeddb/transaction-overlapping-expected.txt: Added.
* storage/indexeddb/transaction-overlapping.html: Added.

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

5 years ago[iOS][wk2] Don't use view snapshots if the destination layer is a different size
timothy_horton@apple.com [Mon, 23 Jun 2014 22:12:49 +0000 (22:12 +0000)]
[iOS][wk2] Don't use view snapshots if the destination layer is a different size
https://bugs.webkit.org/show_bug.cgi?id=134210
<rdar://problem/17369463>

Reviewed by Benjamin Poulain.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Only use the view snapshot if the snapshot is the same (in device space) size
as the layer it's going to be put into, and only if the device scale factor is
the same as it was when the snapshot was taken.

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

5 years ago[iOS][WK2] Make the state restore from HistoryItem more precise and reliable
benjamin@webkit.org [Mon, 23 Jun 2014 22:05:47 +0000 (22:05 +0000)]
[iOS][WK2] Make the state restore from HistoryItem more precise and reliable
https://bugs.webkit.org/show_bug.cgi?id=134150

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-23
Reviewed by Tim Horton.

Source/WebCore:
The two biggest changes for WebCore are:
-Store everything we need to handle changes of ViewportConfiguration on HistoryItem.
-Store the exposedRect with floating point coordinates.

* WebCore.exp.in:
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
We cannot determine a good scroll position from the WebProcess because the obscured insets can change
arbitrarily in the UIProcess. When we scroll here from the WebProcess, we would force an invalid position
to the UIProcess with the next layer tree update.

To avoid any problem, we prohibit scrolling when restoring the focus appearance.

* history/HistoryItem.cpp:
(WebCore::encodeRect):
(WebCore::encodeSize):
(WebCore::HistoryItem::encodeBackForwardTreeNode):
(WebCore::decodeRect):
(WebCore::decodeSize):
(WebCore::HistoryItem::decodeBackForwardTree):
* history/HistoryItem.h:
(WebCore::HistoryItem::exposedContentRect):
(WebCore::HistoryItem::setExposedContentRect):
(WebCore::HistoryItem::unobscuredContentRect):
(WebCore::HistoryItem::setUnobscuredContentRect):
(WebCore::HistoryItem::minimumLayoutSizeInScrollViewCoordinates):
(WebCore::HistoryItem::setMinimumLayoutSizeInScrollViewCoordinates):
(WebCore::HistoryItem::contentSize):
(WebCore::HistoryItem::setContentSize):
(WebCore::HistoryItem::exposedContentPosition): Deleted.
(WebCore::HistoryItem::setExposedContentPosition): Deleted.
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
* page/FrameView.h:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::exposedContentRect):
(WebCore::ScrollView::setExposedContentRect):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangeVisibleRect):

Source/WebKit2:
This patch make several little improvements to improve how we restore the visible content rect and scale
from the HistoryItem.

The biggest architectural change is that the exposed rect is now restored on the UIProcess instead of the WebProcess,
this ensure we restore the same position regardless of any modification of obscured areas.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionId):
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
A race between the UIProcess and the WebProcess could cause the viewport of the next page to be influenced by updates
of the previous page. To avoid that, VisibleContentRectUpdateInfo keeps track of the last transaction seen at the time
of the update.

The WebProcess updates the size and scale of the content through layer tree updates. If an update was generated for a layer tree
update of the old page, none of the information is valid for the current content. Since the UIProcess drives the state in case of conflicts,
the WebProcess was updating the scale of the current page based on incorrect information.

To avoid the problems, we save the layer tree transaction ID when we commit a new page. Only updates after that transaction are useful
for the current page.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
(withinEpsilon):
(changeContentOffsetBoundedInValidRange):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _restorePageStateToExposedRect:WebCore::scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:WebCore::scale:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::restorePageState):
(WebKit::PageClientImpl::restorePageCenterAndScale):
Restoring the state is now done by WKWebView. The state is only updated on the next layer tree commit,
this is done to avoid any jumping if the page has scrolled since we tried to restore its state.

Both update path end up calling _updateVisibleContentRects. This is because the update on the WebProcess
never sets the ScrollPosition (because it does not know the current state of the obscured insets). Pushing
a new VisibleContentRect will nicely udpates the exposed rect, scroll position, fixed elements, etc.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::lastCommittedLayerTreeTransactionID):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
(WebKit::WebFrameLoaderClient::restoreViewState):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
Get rid of m_obscuredTopInset. It was a bad idea. The UIProcess updates the obscured insets a lot during
page load, the value we used to restore the scroll position was frequently stale.

(WebKit::WebPage::userHasChangedPageScaleFactor): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::savePageState):
(WebKit::scaleAfterViewportWidthChange):
(WebKit::relativeCenterAfterContentSizeChange):
(WebKit::adjustExposedRectForNewScale):
Extract this out of dynamicViewportSizeUpdate(). It is useful to adjust the exposed rect when restoring a HistoryItem
to a ViewportConfiguration that is different from when it was saved.

(WebKit::WebPage::restorePageState):
There are two variations of restorePage:
1) If the viewport configuration is compatible, restore the exact scale and position of the page.
2) Otherwise, restore the scale and position similarily to dynamicViewportSizeUpdate().

(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::adjustExposedRectForBoundedScale):
(WebKit::RemoteLayerTreeDrawingArea::currentTransactionID):
Expose the transactionID for the race issue on VisibleRectUpdate.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
Store the exposed rect in floating point coordinates. This makes it possible to restore that exact
position when needed.

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

5 years agoUnreviewed, revert an unintentional change committed with r170323.
eric.carlson@apple.com [Mon, 23 Jun 2014 22:04:02 +0000 (22:04 +0000)]
Unreviewed, revert an unintentional change committed with r170323.

* UIProcess/API/Cocoa/WKBackForwardList.mm:

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

5 years ago[Mac] process raw VTT in-band captions
eric.carlson@apple.com [Mon, 23 Jun 2014 21:56:30 +0000 (21:56 +0000)]
[Mac] process raw VTT in-band captions
https://bugs.webkit.org/show_bug.cgi?id=134178

Reviewed by NOBODY (OOPS!).

* CMakeLists.txt: Add ISOVTTCue.cpp|h.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* html/track/BufferedLineReader.h:
(WebCore::BufferedLineReader::reset): New, empty the input buffer.

Make it possible to process WebVTT captions.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
(WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
(WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
(WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
(WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
(WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
* html/track/InbandGenericTextTrack.h:

* html/track/InbandTextTrack.h:

* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
    object.
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
(WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
(WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
* html/track/InbandWebVTTTextTrack.h:

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
    from a pointer to a reference.
(WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.

* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
(WebCore::VTTCueBox::VTTCueBox): Ditto.
(WebCore::VTTCueBox::getCue): Return a reference.
(WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
(WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
(WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
(WebCore::VTTCue::initialize): New, shared constructor initialization.
(WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
(WebCore::VTTCue::markFutureAndPastNodes): Ditto.
(WebCore::VTTCue::setCueSettings): Ditto.
* html/track/VTTCue.h:
(WebCore::VTTCueBox::create): Deleted.
(WebCore::VTTCue::create): Deleted.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state,
    call the parser.
(WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
(WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
(WebCore::WebVTTParser::collectTimeStamp): Ditto.
* html/track/WebVTTParser.h:
(WebCore::WebVTTCueData::originalStartTime): New.
(WebCore::WebVTTCueData::setOriginalStartTime): New.
(WebCore::WebVTTCueData::WebVTTCueData):

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.

* platform/graphics/InbandTextTrackPrivateClient.h:
(WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.

Parse ISO WebVTT cue boxes.
* platform/graphics/ISOVTTCue.cpp: Added.
(WebCore::ISOBox::ISOBox):
(WebCore::ISOBox::peekType):
(WebCore::ISOBox::peekLength):
(WebCore::ISOBox::peekString):
(WebCore::vttCueBoxType):
(WebCore::vttIdBoxType):
(WebCore::vttSettingsBoxType):
(WebCore::vttPayloadBoxType):
(WebCore::vttCurrentTimeBoxType):
(WebCore::vttCueSourceIDBoxType):
(WebCore::ISOWebVTTCue::boxType):
(WebCore::ISOWebVTTCue::ISOWebVTTCue):
* platform/graphics/ISOVTTCue.h: Added.
(WebCore::ISOBox::boxHeaderSize):
(WebCore::ISOBox::length):
(WebCore::ISOBox::type):
(WebCore::ISOWebVTTCue::presentationTime):
(WebCore::ISOWebVTTCue::duration):
(WebCore::ISOWebVTTCue::sourceID):
(WebCore::ISOWebVTTCue::id):
(WebCore::ISOWebVTTCue::originalStartTime):
(WebCore::ISOWebVTTCue::settings):
(WebCore::ISOWebVTTCue::cueText):

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
(WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of
    CMSampleBuffers, create ISOWebVTTCue from the sample data.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
(WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
    options until we have tracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as
    attributed strings to track.
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
* platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
(WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):

* platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
    format to base class.

* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
(WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF): Ditto.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:

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

5 years agoPolicy delegate methods should use CompletionHandlerCallChecker
andersca@apple.com [Mon, 23 Jun 2014 21:40:06 +0000 (21:40 +0000)]
Policy delegate methods should use CompletionHandlerCallChecker
https://bugs.webkit.org/show_bug.cgi?id=134215

Reviewed by Dan Bernstein.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

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

5 years agoDon't use the WK prefix for internal C++ types
andersca@apple.com [Mon, 23 Jun 2014 21:33:34 +0000 (21:33 +0000)]
Don't use the WK prefix for internal C++ types
https://bugs.webkit.org/show_bug.cgi?id=134214

Reviewed by Dan Bernstein.

* Shared/AssistedNodeInformation.cpp:
(WebKit::OptionItem::encode):
(WebKit::OptionItem::decode):
(WebKit::WKOptionItem::encode): Deleted.
(WebKit::WKOptionItem::decode): Deleted.
* Shared/AssistedNodeInformation.h:
(WebKit::OptionItem::OptionItem):
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
(WebKit::WKOptionItem::WKOptionItem): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _updateAccessory]):
(-[WKContentView textInputTraits]):
(-[WKContentView assistedNodeSelectOptions]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKFormInputControl initWithView:]):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm:
(adjustedFontSize):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKOptionPickerCell initWithOptionItem:]):
(-[WKOptionGroupPickerCell initWithOptionItem:]):
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController populateCell:withItem:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):

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

5 years ago[Cocoa] No way to grant storage quotas for web application cache
mitz@apple.com [Mon, 23 Jun 2014 21:32:43 +0000 (21:32 +0000)]
[Cocoa] No way to grant storage quotas for web application cache
https://bugs.webkit.org/show_bug.cgi?id=134213

Reviewed by Anders Carlsson.

* UIProcess/API/APIUIClient.h:
(API::UIClient::reachedApplicationCacheOriginQuota): Added this new client function, with
a default implementation that calls the completion handler with the current quota.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared a new delegate method.

* UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
(-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Changed the parameter into a const
reference, since we copy it.
* UIProcess/API/Cocoa/_WKSecurityOriginInternal.h:

* UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::reachedApplicationCacheOriginQuota.
Added flag to m_delegateMethods struct for new delegate method.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Updated for change in
_WKSecurityOrigin initializer.
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): Added. Calls the new
delegate method.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reachedApplicationCacheOriginQuota): Added. Forwards the message to
the UI client.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Added ReachedApplicationCacheOriginQuota message.

* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota): Changed the return
type to bool, indicating whether the client handled the callback.

* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): Return the
appropriate value.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): If the bundle client didn’t
handle the callback, send a message the the UI process, and update the quota with the reply.

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

5 years ago[wk2] Synchronously wait a short time for a layer tree update after bringing a web...
timothy_horton@apple.com [Mon, 23 Jun 2014 21:32:03 +0000 (21:32 +0000)]
[wk2] Synchronously wait a short time for a layer tree update after bringing a web view in-window
https://bugs.webkit.org/show_bug.cgi?id=134189

Reviewed by Simon Fraser.

Make the old behavior of -[WKView endDeferringViewInWindowChangesSync] the default; synchronously wait
for a fraction of a second when a page that was previously in-window but currently isn't comes back in-window,
until new content is painted (or we hit a timeout).

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForDidUpdateViewState):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
Delegate waitForDidUpdateViewState to the DrawingAreaProxys, because behavior is very dependent on them.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
Implement waitForDidUpdateViewState for the RemoteLayerTree; it waits for CommitLayerTree.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::viewStateDidChange):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::viewSize): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChangesSync]):
Always waitForDidUpdateViewState when a page that was previously in-window but currently isn't comes back in-window.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
Delegate sending of didUpdateViewState to the DrawingAreas (RemoteLayerTreeDrawingArea won't send it,
    because the UI process waits for CommitLayerTree instead).

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

5 years ago[MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
jer.noble@apple.com [Mon, 23 Jun 2014 21:27:59 +0000 (21:27 +0000)]
[MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
https://bugs.webkit.org/show_bug.cgi?id=134211

Reviewed by Eric Carlson.

Null-check m_source before dereferencing, as the SourceBuffer may have been removed
from its MediaSource before this error was received.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):

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

5 years ago[iOS][wk2] Ensure that layers are marked volatile before allowing the process to...
timothy_horton@apple.com [Mon, 23 Jun 2014 21:12:00 +0000 (21:12 +0000)]
[iOS][wk2] Ensure that layers are marked volatile before allowing the process to suspend
https://bugs.webkit.org/show_bug.cgi?id=134004
<rdar://problem/17186342>

Reviewed by Simon Fraser.

WebKit tries to make layers volatile when unparented, but sometimes isn't given
a chance to do so before the process gets suspended, so we end up with lots of
non-volatile surfaces that should really be volatile.

* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatileImmediatelyIfPossible):
Add markAllBackingStoreVolatileImmediatelyIfPossible, which tries to mark *all*
buffers of *all* backing store, (live and unreachable), (front, back, and secondary),
volatile right away. It returns false if any buffer isn't marked volatile (because it was in-use).

* UIProcess/ios/ProcessThrottler.h:
* UIProcess/ios/ProcessThrottler.mm:
(WebKit::ProcessThrottler::updateAssertion):
(WebKit::ProcessThrottler::processReadyToSuspend):
(WebKit::ProcessThrottler::didCancelProcessSuspension):
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
If the UI process is waiting for the Web process to confirm that it can suspend
and something happens (the view is reparented) that cancels the suspension, inform
the Web process that this happened, so that it can cancel any cleanup that might still be taking place.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
If a view goes in-window, dispatch the view state change immediately without delay,
to minimize the latency between coming in-window and being ready to go.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::markLayersVolatileImmediatelyIfPossible):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
Schedule a flush when we change the root layer; otherwise, we can end up
detaching the root layer but changing nothing else, and never committing that change.

(WebKit::RemoteLayerTreeDrawingArea::markLayersVolatileImmediatelyIfPossible):

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::processWillSuspend):
(WebKit::WebProcess::cancelProcessWillSuspend):
(WebKit::WebProcess::markAllLayersVolatileIfPossible):
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
When the UI process is going to suspend the process, it sends us ProcessWillSuspend,
and defers the suspension until we send a ProcessReadyToSuspend back.
Delay ProcessReadyToSuspend until all layers in our process have been marked volatile.
We'll keep trying every 20ms until they're all volatile. For safety, the UI process will eventually
stop waiting for us, but the volatility change is usually applied successfully within the first
or second timer callback.

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

5 years agoReduce synchronous layout triggered by JavaScript-based media controls
commit-queue@webkit.org [Mon, 23 Jun 2014 21:01:19 +0000 (21:01 +0000)]
Reduce synchronous layout triggered by JavaScript-based media controls
https://bugs.webkit.org/show_bug.cgi?id=134208

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-23
Reviewed by Eric Carlson.

Avoid always querying the offsetWidth and offsetHeight of the timeline
by only calculating these values when the timeline may change size.
Also avoid doing work in a few cases where properties did not
actually change.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):

(Controller.prototype.setNeedsTimelineMetricsUpdate):
(Controller.prototype.updateTimelineMetricsIfNeeded):
Only update the timeline metrics when they may have changed.

(Controller.prototype.updateControls):
(Controller.prototype.handleTimelineMouseMove):
(Controller.prototype.progressFillStyle):
(Controller.prototype.showControls):
(Controller.prototype.addControls):
Mark timeline metrics need update based on various UI changes.

(Controller.prototype.setStatusHidden):
Only do work if the hidden status changed.
Mark timeline metrics need update if the timeline is changed.

(Controller.prototype.updateProgress):
Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS):
(ControllerIOS.prototype.updateControls):

(ControllerIOS.prototype.updateProgress):
Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.

(ControllerIOS.prototype.handleWirelessPlaybackChange):
Mark timeline metrics need update as button may have changed.

(ControllerIOS.prototype.handleWirelessTargetAvailableChange):
Only do work if the availability changed.
Mark timeline metrics need update as a new button may have appeared.

(ControllerIOS.prototype.set pageScaleFactor):
Only do work if the page scale factor changed.

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

5 years agoAdd skeleton code for updated Gamepad API
beidson@apple.com [Mon, 23 Jun 2014 20:24:43 +0000 (20:24 +0000)]
Add skeleton code for updated Gamepad API
https://bugs.webkit.org/show_bug.cgi?id=134165

Unreviewed - Forgotten review feedback from http://trac.webkit.org/changeset/170309

* Modules/gamepad/GamepadButton.idl: Forgot to commit the removal of NoInterfaceObject here.

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

5 years agoEnsure that we always use symlink free paths when specifying cache directories
oliver@apple.com [Mon, 23 Jun 2014 20:19:35 +0000 (20:19 +0000)]
Ensure that we always use symlink free paths when specifying cache directories
https://bugs.webkit.org/show_bug.cgi?id=134206

Reviewed by Anders Carlsson.

Sandboxing will deny symlink based paths, so we use realpath to create extensions.
This leaves us in the position of an extension using a visually different path
from other parts of the process code.  This patch simply makes sure that we always
use the realpath for cache directories, so making debugging easier and also ensuring
that we don't ever accidentally try to use a path with symlinks that will thus get
denied.

* Shared/SandboxExtension.h:
(WebKit::stringByResolvingSymlinksInPath):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::stringByResolvingSymlinksInPath):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):

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

5 years agoInline the UnlinkedInstructionStream::Reader logic.
akling@apple.com [Mon, 23 Jun 2014 19:58:19 +0000 (19:58 +0000)]
Inline the UnlinkedInstructionStream::Reader logic.
<https://webkit.org/b/134203>

This class is only used by CodeBlock to unpack the unlinked instructions,
and we were spending 0.5% of total time on PLT calling Reader::next().
Move the logic to the header file and mark it ALWAYS_INLINE.

Reviewed by Geoffrey Garen.

* bytecode/UnlinkedInstructionStream.cpp:
* bytecode/UnlinkedInstructionStream.h:
(JSC::UnlinkedInstructionStream::Reader::Reader):
(JSC::UnlinkedInstructionStream::Reader::read8):
(JSC::UnlinkedInstructionStream::Reader::read32):
(JSC::UnlinkedInstructionStream::Reader::next):

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

5 years agoUnregister notification observer registered in r170156.
roger_fong@apple.com [Mon, 23 Jun 2014 19:35:54 +0000 (19:35 +0000)]
Unregister notification observer registered in r170156.
https://bugs.webkit.org/show_bug.cgi?id=134204.

Reviewed by Tim Horton.

* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):

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

5 years agoFix a test case failing on WK1 after r170296.
antti@apple.com [Mon, 23 Jun 2014 19:29:08 +0000 (19:29 +0000)]
Fix a test case failing on WK1 after r170296.

There is now a non-visual render tree dump difference between WK1 and Wk2 results here due to wk1 requiring an additional style synchronization.

* platform/mac-wk2/editing/inserting: Added.
* platform/mac-wk2/editing/inserting/break-blockquote-after-delete-expected.txt: Copied from LayoutTests/platform/mac/editing/inserting/break-blockquote-after-delete-expected.txt.
* platform/mac/editing/inserting/break-blockquote-after-delete-expected.txt:

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

5 years agoAdd skeleton code for updated Gamepad API
beidson@apple.com [Mon, 23 Jun 2014 19:19:55 +0000 (19:19 +0000)]
Add skeleton code for updated Gamepad API
https://bugs.webkit.org/show_bug.cgi?id=134165

Reviewed by Dean Jackson.

No new tests (No change in behavior for any tested configuration)

Interface and dummy implementation for the Gamepad object:
* Modules/gamepad/Gamepad.cpp: Added.
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::~Gamepad):
(WebCore::Gamepad::axes):
(WebCore::Gamepad::buttons):
* Modules/gamepad/Gamepad.h: Added.
* Modules/gamepad/Gamepad.idl: Added.

Interface and dummy implementation for the GamepadButton object:
* Modules/gamepad/GamepadButton.cpp: Added.
(WebCore::GamepadButton::GamepadButton):
(WebCore::GamepadButton::pressed):
* Modules/gamepad/GamepadButton.h: Added.
(WebCore::GamepadButton::create):
(WebCore::GamepadButton::value):
(WebCore::GamepadButton::setValue):
* Modules/gamepad/GamepadButton.idl: Added.

Interface and dummy implementation for the GamepadEvent object:
* Modules/gamepad/GamepadEvent.cpp: Added.
(WebCore::GamepadEvent::GamepadEvent):
* Modules/gamepad/GamepadEvent.h: Added.
(WebCore::GamepadEventInit::GamepadEventInit):
(WebCore::GamepadEvent::~GamepadEvent):
(WebCore::GamepadEvent::create):
(WebCore::GamepadEvent::gamepad):
* Modules/gamepad/GamepadEvent.idl: Added.
* dom/EventNames.in:

Interface and dummy implementation for additions to the Navigator object:
* Modules/gamepad/NavigatorGamepad.cpp: Added.
(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::supplementName):
(WebCore::NavigatorGamepad::from):
(WebCore::NavigatorGamepad::getGamepads):
(WebCore::NavigatorGamepad::gamepads):
* Modules/gamepad/NavigatorGamepad.h: Added.
* Modules/gamepad/NavigatorGamepad.idl: Added.

Bindings additions necessary for these new interfaces:
* bindings/js/JSDOMBinding.h:
(WebCore::JSValueTraits<double>::arrayJSValue):
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:

Project file stuff:
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* DerivedSources.make:

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

5 years agoCatch Obj-C exceptions thrown by _linenPatternImage
simon.fraser@apple.com [Mon, 23 Jun 2014 19:02:23 +0000 (19:02 +0000)]
Catch Obj-C exceptions thrown by _linenPatternImage
https://bugs.webkit.org/show_bug.cgi?id=134202

Reviewed by Geoffrey Garen.

Catch Objective-C exceptions thrown by _linenPatternImage and
-[NSImage CGImageForProposedRect:context:hints:].

* platform/mac/ScrollbarThemeMac.mm:
(WebCore::linenBackgroundColor):

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

5 years agoCSS clip property should make layers non-opaque
simon.fraser@apple.com [Mon, 23 Jun 2014 19:00:34 +0000 (19:00 +0000)]
CSS clip property should make layers non-opaque
https://bugs.webkit.org/show_bug.cgi?id=134147

Source/WebCore:
<rdar://problem/17324579>

Reviewed by Tim Horton.

https://www.fairphone.com has position:fixed elements with clip: rect(...)
but we were making those layers opaque, resulting in garbage pixels
in areas outside the clip rect.

Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().

Test: compositing/contents-opaque/opaque-with-clip.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Tim Horton.

* compositing/contents-opaque/opaque-with-clip-expected.html: Added.
* compositing/contents-opaque/opaque-with-clip.html: Added.

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

5 years agoAdding a mask on a simple color compositing layer removes the content
simon.fraser@apple.com [Mon, 23 Jun 2014 19:00:32 +0000 (19:00 +0000)]
Adding a mask on a simple color compositing layer removes the content
https://bugs.webkit.org/show_bug.cgi?id=134127

Reviewed by Dean Jackson.

Source/WebCore:

In r169053 I moved some updateDrawsContent() into updateAfterDescendents(),
but this isn't called when a composited layer gains or loses a mask (which
doesn't cause a layout). This caused us to fail to allocate backing store
when gaining a mask, resulting in missing content.

Fix by calling updateAfterDescendents() from RenderLayer::styleChange()
when the layer config isn't changing.

Also remove a condition in isSimpleContainerCompositingLayer() that caused us
to fall off the simple layer path for masked layers, since this works just
fine.

Test: compositing/masks/solid-color-masked.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):

LayoutTests:

* compositing/masks/mask-layer-size-expected.txt:
* compositing/masks/solid-color-masked-expected.html: Added.
* compositing/masks/solid-color-masked.html: Added.

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

5 years agoEnable the Web Inspector in MiniBrowser
simon.fraser@apple.com [Mon, 23 Jun 2014 19:00:30 +0000 (19:00 +0000)]
Enable the Web Inspector in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=134148

Reviewed by Joseph Pecoraro.

Set the pref to enable Web Inspector in both WK1 and WK2 windows.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate applicationDidFinishLaunching:]):

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

5 years ago[New Multicolumn] Writing mode changes on the <html> and RenderView need to
hyatt@apple.com [Mon, 23 Jun 2014 18:56:52 +0000 (18:56 +0000)]
[New Multicolumn] Writing mode changes on the <html> and RenderView need to
be propagated to column sets and flow thread children of those renderers.
https://bugs.webkit.org/show_bug.cgi?id=134121
<rdar://problem/16884527>

Reviewed by Dean Jackson.

Source/WebCore:
Added fast/multicol/pagination/RightToLeft-rl-dynamic.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
Refactor the propagation code for column sets and flow thread styles into a helper
function that is called here.

(WebCore::RenderBlockFlow::updateStylesForColumnChildren):
* rendering/RenderBlockFlow.h:
Add a new helper function for recalculating the styles of the column sets and
flow thread in response to changes.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
When the style is changed for a root element or the RenderView in response to
writing mode and direction changes, make sure that style gets propagated to
the column children by calling the new helper function.

LayoutTests:
* fast/multicol/pagination/RightToLeft-rl-dynamic.html: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.png: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.png:
* platform/mac/fast/multicol/pagination/nested-transforms-expected.png:

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

5 years ago[Cocoa] No way to grant storage quotas for WebSQL
mitz@apple.com [Mon, 23 Jun 2014 18:25:12 +0000 (18:25 +0000)]
[Cocoa] No way to grant storage quotas for WebSQL
https://bugs.webkit.org/show_bug.cgi?id=134175

Reviewed by Anders Carlsson.

* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::securityOrigin): Changed to return a non-const reference.

* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota): Added a completion handler parameter than takes the
new quota, and changed the return type to void.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Changed the override of exceededDatabaseQuota to call the
completion handler with the new quota, or with the existing quota if the client doesn’t
implement the callback.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared new delegate method.

* UIProcess/API/Cocoa/_WKSecurityOrigin.h: Added.
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Added.
(-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Store the origin in an ivar.
(-[_WKSecurityOrigin protocol]): Added this accessor.
(-[_WKSecurityOrigin host]): Ditto.
(-[_WKSecurityOrigin port]): Ditto.
* UIProcess/API/Cocoa/_WKSecurityOriginInternal.h: Added.

* UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::exceededDatabaseQuota. Added flag
to m_delegateMethods struct for new delegate method.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Added. Calls the new delegate method.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota): Updated for the new client interface: now
passing a completion handler that replies with the new quota.

* WebKit2.xcodeproj/project.pbxproj: Added references to new files, sorted a group.

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

5 years ago[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
dino@apple.com [Mon, 23 Jun 2014 18:16:39 +0000 (18:16 +0000)]
[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=134183

Follow-up review from Sam Weinig.

* platform/graphics/GraphicsContext3D.h: Merge another bit of MAC and IOS
code.
* ChangeLog: Actually read his review comments this time.

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

5 years ago[Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
jer.noble@apple.com [Mon, 23 Jun 2014 18:01:24 +0000 (18:01 +0000)]
[Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
https://bugs.webkit.org/show_bug.cgi?id=134198

Reviewed by Eric Carlson.

Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
return that layer from platformLayer() unless we've been asked to, we no longer are
asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().

Instead, explicitly destroy our video layer (and remove the KVO-observer which is
causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):

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

5 years agoMore build fixing after r170295.
simon.fraser@apple.com [Mon, 23 Jun 2014 17:50:02 +0000 (17:50 +0000)]
More build fixing after r170295.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

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

5 years agoFix build.
andersca@apple.com [Mon, 23 Jun 2014 17:39:02 +0000 (17:39 +0000)]
Fix build.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

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

5 years agoGive read-only properties proper ownership attributes
andersca@apple.com [Mon, 23 Jun 2014 17:27:14 +0000 (17:27 +0000)]
Give read-only properties proper ownership attributes
https://bugs.webkit.org/show_bug.cgi?id=134197
<rdar://problem/16830117>

Reviewed by Dan Bernstein.

Also, make WKFrameInfo conform to NSCopying since it's a data-only object and thus intended to be copied.

* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo copyWithZone:]):
(-[WKFrameInfo setRequest:]): Deleted.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction setSourceFrame:]):
(-[WKNavigationAction setTargetFrame:]):
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:

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

5 years agoRemove unused FrameView::setUseCustomFixedPositionLayoutRect().
akling@apple.com [Mon, 23 Jun 2014 17:07:54 +0000 (17:07 +0000)]
Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
<https://webkit.org/b/134194>

Reviewed by Anders Carlsson.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
* page/FrameView.h:

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

5 years agoREGRESSION (r160908): Unable to unset bold while entering text
antti@apple.com [Mon, 23 Jun 2014 17:02:27 +0000 (17:02 +0000)]
REGRESSION (r160908): Unable to unset bold while entering text
https://bugs.webkit.org/show_bug.cgi?id=134196
<rdar://problem/17051653>

Reviewed by Andreas Kling.

No test, this code path is used by some WK1 API clients only.

* editing/Editor.cpp:
(WebCore::Editor::styleForSelectionStart):

    This needs to update the style before requesting the renderer.

* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::styleForSelectionStart): Deleted.
* editing/mac/EditorMac.mm:
(WebCore::styleForSelectionStart): Deleted.

    Removed the duplicated functions, moved to Editor.cpp.

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

5 years ago[iOS] Fix video in WebGL.
achristensen@apple.com [Mon, 23 Jun 2014 16:39:13 +0000 (16:39 +0000)]
[iOS] Fix video in WebGL.
https://bugs.webkit.org/show_bug.cgi?id=133511

Reviewed by Jer Noble.

* WebCore.exp.in:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
(WebCore::wkAVAssetResolvedURL): Deleted.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.

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

5 years ago[EFL] Move WebKit2 test results into LayoutTests/platform/efl
m.pakula@samsung.com [Mon, 23 Jun 2014 15:25:49 +0000 (15:25 +0000)]
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/webaudio/oscillator-custom-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-custom-expected.wav.
* platform/efl/webaudio/oscillator-sawtooth-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-sawtooth-expected.wav.
* platform/efl/webaudio/oscillator-sine-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-sine-expected.wav.
* platform/efl/webaudio/oscillator-square-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-square-expected.wav.
* platform/efl/webaudio/oscillator-triangle-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-triangle-expected.wav.
* platform/efl/webaudio/up-mixing-mono-51-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-mono-51-expected.wav.
* platform/efl/webaudio/up-mixing-mono-stereo-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-mono-stereo-expected.wav.
* platform/efl/webaudio/up-mixing-stereo-51-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-stereo-51-expected.wav.

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

5 years ago[EFL] Move WebKit2 test results into LayoutTests/platform/efl
m.pakula@samsung.com [Mon, 23 Jun 2014 15:21:52 +0000 (15:21 +0000)]
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/webaudio/audiobuffersource-loop-points-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-loop-points-expected.wav.
* platform/efl/webaudio/audiobuffersource-multi-channels-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-multi-channels-expected.wav.
* platform/efl/webaudio/audiobuffersource-playbackrate-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-playbackrate-expected.wav.
* platform/efl/webaudio/gain-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/gain-expected.wav.
* platform/efl/webaudio/mixing-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/mixing-expected.wav.

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

5 years ago[EFL] Move WebKit2 test results into LayoutTests/platform/efl
m.pakula@samsung.com [Mon, 23 Jun 2014 15:13:31 +0000 (15:13 +0000)]
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/fast/: Renamed from LayoutTests/platform/efl-wk2/fast/.
* platform/efl/webaudio/audiobuffersource-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-expected.wav.
* platform/efl/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav.
* platform/efl/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav.
* platform/efl/webaudio/codec-tests/wav/24bit-44khz-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/wav/24bit-44khz-expected.wav.

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

5 years agoREGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlow...
stavila@adobe.com [Mon, 23 Jun 2014 14:59:48 +0000 (14:59 +0000)]
REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
https://bugs.webkit.org/show_bug.cgi?id=133587

Reviewed by Antti Koivisto.

When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
its information must be removed from the flowthread prior to the change being made.
Otherwise, the flow thread will no longer be its containing block and a reference to it
will not be possible to obtain.

No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
handle the following issue in a separate bug.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleWillChange):
* rendering/RenderObject.h:
(WebCore::RenderObject::flowThreadContainingBlock):

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

5 years ago[EFL] Move WebKit2 test results into LayoutTests/platform/efl
m.pakula@samsung.com [Mon, 23 Jun 2014 14:59:26 +0000 (14:59 +0000)]
[EFL] Move WebKit2 test results into LayoutTests/platform/efl

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/accessibility/: Renamed from LayoutTests/platform/efl-wk2/accessibility/.
* platform/efl/compositing/: Renamed from LayoutTests/platform/efl-wk2/compositing/.
* platform/efl/editing/: Renamed from LayoutTests/platform/efl-wk2/editing/.
* platform/efl/fast/: Renamed from LayoutTests/platform/efl-wk2/fast/.
* platform/efl/http/: Renamed from LayoutTests/platform/efl-wk2/http/.
* platform/efl/ietestcenter: Renamed from LayoutTests/platform/efl-wk2/ietestcenter/.
* platform/efl/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt: Renamed from LayoutTests/platform/efl-wk2/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt.
* platform/efl/loader/go-back-cached-main-resource-expected.txt: Renamed from LayoutTests/platform/efl-wk2/loader/go-back-cached-main-resource-expected.txt.
* platform/efl/media/video-layer-crash-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-layer-crash-expected.png.
* platform/efl/media/video-transformed-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-transformed-expected.png.
* platform/efl/media/video-zoom-controls-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-zoom-controls-expected.png.
* platform/efl/media/video-zoom-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-zoom-expected.png.
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-expected.txt: Renamed from LayoutTests/platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt.
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: Renamed from LayoutTests/platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt.
* platform/efl/svg/: Renamed from LayoutTests/platform/efl-wk2/svg/.
* platform/efl/transforms/2d/hindi-rotated-expected.png:
* platform/efl/transforms/2d/hindi-rotated-expected.txt:

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

5 years ago[EFL] Remove the WebKit1 EFL code
ossy@webkit.org [Mon, 23 Jun 2014 13:33:26 +0000 (13:33 +0000)]
[EFL] Remove the WebKit1 EFL code
https://bugs.webkit.org/show_bug.cgi?id=134096

Patch by Ryuan Choi <ryuan.choi@samsung.com> on 2014-06-23
Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Removed.
* efl: Removed entire efl directory.

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

5 years ago[EFL] Platform support for WebSpeech feature.
k.czech@samsung.com [Mon, 23 Jun 2014 12:13:34 +0000 (12:13 +0000)]
[EFL] Platform support for WebSpeech feature.
https://bugs.webkit.org/show_bug.cgi?id=116438

Reviewed by Csaba Osztrogonác.

.:
Add ENABLE_SPEECH_SYNTHESIS flag to have Speech Synthesis in EFL.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:
It's a first step of adding support for Speech Synthesis in EFL port.
Just stub out required API and support for compilation.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake: Added some idls to not break GTK build.
* platform/PlatformSpeechSynthesizer.h:
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
(WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
(WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
(WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
(WebCore::PlatformSpeechSynthesisProviderEfl::pause):
(WebCore::PlatformSpeechSynthesisProviderEfl::resume):
(WebCore::PlatformSpeechSynthesisProviderEfl::speak):
(WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
* platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
* platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):

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

5 years agoMake it clear to get m_svgExtensions using svgExtensions().
commit-queue@webkit.org [Mon, 23 Jun 2014 11:11:16 +0000 (11:11 +0000)]
Make it clear to get m_svgExtensions using svgExtensions().
https://bugs.webkit.org/show_bug.cgi?id=134186.

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-06-23
Reviewed by Dirk Schulze.

This patch makes sure that the purpose of code is to get m_svgExtensions
as changing accessSVGExtensions() to svgExtensions().
svgExtensions() is a getter API and accessSVGExtensions() checks
the presence of m_svgExtensions and create m_svgExtensions if it does not exist.

No new tests, no behavior change.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::commonTeardown):
(WebCore::Document::implicitClose):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::startAnimations):
(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):
(WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
(WebCore::SVGDocumentExtensions::rebuildElements):
* svg/SVGDocumentExtensions.h:

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

5 years agoREGRESSION (r170257) http/tests/navigation/javascriptlink-frames.html fails on Mounta...
dino@apple.com [Mon, 23 Jun 2014 08:09:38 +0000 (08:09 +0000)]
REGRESSION (r170257) http/tests/navigation/javascriptlink-frames.html fails on MountainLion
https://bugs.webkit.org/show_bug.cgi?id=134182

Rebaseline for Mountain Lion.

* platform/mac-mountainlion/TestExpectations: Removed.
* platform/mac-mountainlion/http/tests/navigation/javascriptlink-frames-expected.txt:

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

5 years ago[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
dino@apple.com [Mon, 23 Jun 2014 08:04:35 +0000 (08:04 +0000)]
[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=134183

Reviewed by Sam Weinig.

GraphicsContext3D has a reference to a WebGLLayer that was
hidden behind a PlatformLayer. This meant we had to cast it
to use a WebGLLayer method.

* platform/graphics/GraphicsContext3D.h: Replace RefPtr<PlatformLayer>
with RefPtr<WebGLLayer>.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.

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

5 years agoUnreviewed, GTK build fix after r170274.
yoon@igalia.com [Mon, 23 Jun 2014 07:27:05 +0000 (07:27 +0000)]
Unreviewed, GTK build fix after r170274.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
Drawing::m_webPage changed to reference.

(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
(WebKit::DrawingAreaImpl::forceRepaint):
(WebKit::DrawingAreaImpl::updatePreferences):
(WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
(WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:

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

5 years agoUnreviewed, GTK build fix after r170266.
philn@webkit.org [Mon, 23 Jun 2014 07:10:45 +0000 (07:10 +0000)]
Unreviewed, GTK build fix after r170266.

* Source/cmake/OptionsGTK.cmake: Geoclue also requires gio-unix.

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

5 years agoMake offset from ancestor computation explicit by moving it to the callers.
zalan@apple.com [Mon, 23 Jun 2014 04:28:16 +0000 (04:28 +0000)]
Make offset from ancestor computation explicit by moving it to the callers.
https://bugs.webkit.org/show_bug.cgi?id=134168.

Reviewed by Simon Fraser.

Explicit offset computation helps code reading and less error-prone than passing
the offset pointer and compute it locally when it is null.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::transparencyClipBox):
(WebCore::performOverlapTests):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestTransformedLayerInFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):

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

5 years agoVersioning.
lforschler@apple.com [Mon, 23 Jun 2014 03:46:53 +0000 (03:46 +0000)]
Versioning.

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

5 years agoREGRESSION(r170163): It made everything crash on EFL
gyuyoung.kim@samsung.com [Mon, 23 Jun 2014 02:25:40 +0000 (02:25 +0000)]
REGRESSION(r170163): It made everything crash on EFL
https://bugs.webkit.org/show_bug.cgi?id=134097

Unreviewed EFL layout test and perforamcne crash fix.

* WebProcess/WebPage/WebPage.cpp: Add a null check for m_mainFrame.
(WebKit::WebPage::didCompletePageTransition):

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

5 years agoUnreviewed EFL build fix since r170274. Use reference for m_webPage member variable.
gyuyoung.kim@samsung.com [Mon, 23 Jun 2014 02:15:00 +0000 (02:15 +0000)]
Unreviewed EFL build fix since r170274. Use reference for m_webPage member variable.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
(WebKit::CoordinatedDrawingArea::setNeedsDisplay):
(WebKit::CoordinatedDrawingArea::setNeedsDisplayInRect):
(WebKit::CoordinatedDrawingArea::forceRepaint):
(WebKit::CoordinatedDrawingArea::updatePreferences):
(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
(WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers):
(WebKit::CoordinatedDrawingArea::updateBackingStoreState):
(WebKit::CoordinatedDrawingArea::sendDidUpdateBackingStoreState):
(WebKit::CoordinatedDrawingArea::suspendPainting):
(WebKit::CoordinatedDrawingArea::resumePainting):
(WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingArea::display):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:

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

5 years ago[iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
timothy_horton@apple.com [Mon, 23 Jun 2014 01:32:06 +0000 (01:32 +0000)]
[iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
https://bugs.webkit.org/show_bug.cgi?id=134181

Reviewed by Benjamin Poulain.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureController.h:
Make it explicit that we should only remove the swipe snapshot when a
big-enough render tree size arrives *after the swipe ends*.

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

5 years agoREGRESSION (r170257) http/tests/navigation/javascriptlink-frames.html fails on Mounta...
beidson@apple.com [Mon, 23 Jun 2014 01:19:57 +0000 (01:19 +0000)]
REGRESSION (r170257) http/tests/navigation/javascriptlink-frames.html fails on MountainLion
https://bugs.webkit.org/show_bug.cgi?id=134182

Unreviewed gardening.

* platform/mac-mountainlion/TestExpectations: Added, skip the test.

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

5 years agoThread some references through the remote layer tree code
timothy_horton@apple.com [Mon, 23 Jun 2014 00:51:33 +0000 (00:51 +0000)]
Thread some references through the remote layer tree code
https://bugs.webkit.org/show_bug.cgi?id=134177

Reviewed by Zalan Bujtas.

A first pass at references for never-null things (first pass because I didn't touch the collections).
Things that aren't straightforward reference-threading:

* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
Remove the unimplemented/nonexistant RemoteLayerBackingStoreCollection::create.
Make RemoteLayerBackingStoreCollection constructor not take a context, because m_context is never used.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
Factor out grabbing the PlatformLayerID in a few places.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
Use WebPage::mainFrameView() instead of WebPage::corePage()->mainFrame().view().

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:om):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
* Shared/mac/RemoteLayerBackingStore.mm:
References.

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

5 years agoTransition layer offsets from LayoutPoint to LayoutSize.
zalan@apple.com [Mon, 23 Jun 2014 00:34:25 +0000 (00:34 +0000)]
Transition layer offsets from LayoutPoint to LayoutSize.
https://bugs.webkit.org/show_bug.cgi?id=134156

Reviewed by Simon Fraser.

Use better representation for offset values.

No change in functionality.

* platform/graphics/LayoutSize.h:
(WebCore::roundedForPainting):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::fragmentsBoundingBox):
* rendering/RenderLayer.cpp:
(WebCore::expandClipRectForDescendantsAndReflection):
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::createLocalTransformState):
(WebCore::RenderLayer::hitTestTransformedLayerInFragments):
(WebCore::RenderLayer::hitTestLayerByApplyingTransform):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):

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

5 years agoAttempted iOS build fix.
dino@apple.com [Mon, 23 Jun 2014 00:13:49 +0000 (00:13 +0000)]
Attempted iOS build fix.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.

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

5 years ago[Apple] WebGL layer may use GC3D after free with remote layer hosting
dino@apple.com [Mon, 23 Jun 2014 00:00:03 +0000 (00:00 +0000)]
[Apple] WebGL layer may use GC3D after free with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=134179
<rdar://problem/17412931>

Reviewed by Tim Horton.

With remote layer hosting, a WebGLLayer may attempt to draw after
the GraphicsContext3D has been destroyed. We need to make sure
the GC3D tells the WebGLLayer that it is no longer valid.

While here, I changed some return 0 to return nullptr, the
name of the ObjC property member from m_context to _context,
and removed some unnecessary .get() calls.

This is tested by run-webkit-tests with the --remote-layer-tree
option.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
(WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
to be null.
(WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
* platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
to be null.
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
(-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
(-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
(-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
(-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
(-[WebGLLayer display]): Ditto.

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

5 years ago[WK2] Frameset frames are not scrollable after loading (and should be)
simon.fraser@apple.com [Sun, 22 Jun 2014 18:35:32 +0000 (18:35 +0000)]
[WK2] Frameset frames are not scrollable after loading (and should be)
https://bugs.webkit.org/show_bug.cgi?id=134151
<rdar://problem/17403365>

Reviewed by Dan Bates.

Source/WebCore:
When loading a <frameset>, we could end up with an empty non-fast-scrollable
region for the main frame, because after the initial frameset document layout,
nothing updated the non-fast scrollable region as the subframes added their
scrollable areas to the the main frame's scrollable area set.

Fix by having addScrollableArea() and removeScrollableArea() trigger an update
of the non-fast scrollable region.

Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html

* page/FrameView.cpp:
(WebCore::FrameView::addScrollableArea):
(WebCore::FrameView::removeScrollableArea):
(WebCore::FrameView::scrollableAreaSetChanged):
* page/FrameView.h:

LayoutTests:
Frameset test that dumps the scrolling tree.

* platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/scrollable-page.html: Added.

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

5 years agoReplace a couple of uses of bind with lambdas
andersca@apple.com [Sun, 22 Jun 2014 18:21:49 +0000 (18:21 +0000)]
Replace a couple of uses of bind with lambdas
https://bugs.webkit.org/show_bug.cgi?id=134172

Reviewed by Sam Weinig.

* Platform/IPC/Connection.cpp:
(IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchMessage):
(IPC::Connection::dispatchConnectionDidClose): Deleted.
* Platform/IPC/Connection.h:
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::NP_Deallocate):
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
(WebKit::NetscapePlugin::handlePluginThreadAsyncCall): Deleted.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):

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

5 years agoUnreviewed, rolling out r170265.
commit-queue@webkit.org [Sun, 22 Jun 2014 18:09:36 +0000 (18:09 +0000)]
Unreviewed, rolling out r170265.
https://bugs.webkit.org/show_bug.cgi?id=134174

Broke editing tests (Requested by litherum on #webkit).

Reverted changeset:

"Use unsigneds instead of ints for indexes into a string in
text layout code"
https://bugs.webkit.org/show_bug.cgi?id=133592
http://trac.webkit.org/changeset/170265

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

5 years agoHave scrollingTreeAsText() dump the non-fast-scrollable region
simon.fraser@apple.com [Sun, 22 Jun 2014 18:06:35 +0000 (18:06 +0000)]
Have scrollingTreeAsText() dump the non-fast-scrollable region
https://bugs.webkit.org/show_bug.cgi?id=134149

Reviewed by Sam Weinig.

Source/WebCore:

Dump the non-fast-scrollable region (as an array of rects).

* WebCore.exp.in:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):

Source/WebKit2:

Dump the non-fast-scrollable region (as an array of rects).

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::dump):

LayoutTests:

Rebaselined.

* platform/mac-wk2/tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:

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

5 years agoDisable gamepad feature on EFL and GTK ports by default
gyuyoung.kim@samsung.com [Sun, 22 Jun 2014 17:49:01 +0000 (17:49 +0000)]
Disable gamepad feature on EFL and GTK ports by default
https://bugs.webkit.org/show_bug.cgi?id=134169

Reviewed by Brady Eidson.

* Source/cmake/OptionsEfl.cmake: Disable ENABLE_GAMEPAD_DEPRECATED.

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

5 years agoUse unsigneds instead of ints for indexes into a string in text layout code
mmaxfield@apple.com [Sun, 22 Jun 2014 17:17:07 +0000 (17:17 +0000)]
Use unsigneds instead of ints for indexes into a string in text layout code
https://bugs.webkit.org/show_bug.cgi?id=133592

Reviewed by Zalan Bujtas.

Migrate much of the text-handling code to use unsigneds for indexes into a string.

No new tests because there is no behavior change.

* WebCore.exp.in:
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForText):
(WebCore::computeUnderlineType):
* platform/graphics/Font.h:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawEmphasisMarksForSimpleText):
(WebCore::Font::drawGlyphBuffer):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::adjustSelectionRectForSimpleText):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::size):
(WebCore::GlyphBuffer::glyphs):
(WebCore::GlyphBuffer::advances):
(WebCore::GlyphBuffer::fontDataAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::offsetAt):
(WebCore::GlyphBuffer::reverse):
(WebCore::GlyphBuffer::offsetInString):
(WebCore::GlyphBuffer::swap):
* platform/graphics/GraphicsContext.cpp:
(WebCore::TextRunIterator::atEnd):
* platform/graphics/Latin1TextIterator.h:
(WebCore::Latin1TextIterator::Latin1TextIterator):
(WebCore::Latin1TextIterator::currentCharacter):
* platform/graphics/SimpleFontData.h:
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
* platform/graphics/SurrogatePairAwareTextIterator.h:
(WebCore::SurrogatePairAwareTextIterator::currentCharacter):
* platform/graphics/TextRun.h:
(WebCore::TextRun::length):
(WebCore::TextRun::charactersLength):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::glyphDataForCharacter):
(WebCore::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::advanceOneCharacter):
* platform/graphics/WidthIterator.h:
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::adjustSelectionRectForComplexText):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setNormalizedBuffer):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontWin.cpp:
(WebCore::Font::adjustSelectionRectForComplexText):
(WebCore::Font::getGlyphsAndAdvancesForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::Font::drawGlyphs):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::selectionRectForComplexText):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::selectionState):
(WebCore::adjustCharactersAndLengthForHyphen):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::getStringToRender):
* rendering/RenderCombineText.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::positionForOffset):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
(WebCore::SVGTextMetricsBuilder::advance):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
(WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
(WebCore::SVGTextQuery::subStringLengthCallback):
(WebCore::SVGTextQuery::startPositionOfCharacterCallback):
(WebCore::SVGTextQuery::endPositionOfCharacterCallback):
(WebCore::SVGTextQuery::rotationOfCharacterCallback):
(WebCore::SVGTextQuery::extentOfCharacterCallback):
(WebCore::SVGTextQuery::characterNumberAtPositionCallback):
* rendering/svg/SVGTextQuery.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
* rendering/svg/SVGTextRunRenderingContext.h:
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
* svg/SVGFontData.h:

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

5 years agoAdd IPC decoding support to BackForwardListState
andersca@apple.com [Sun, 22 Jun 2014 16:58:27 +0000 (16:58 +0000)]
Add IPC decoding support to BackForwardListState
https://bugs.webkit.org/show_bug.cgi?id=134171

Reviewed by Dan Bernstein.

* Shared/SessionState.cpp:
(WebKit::isValidEnum):
(WebKit::HTTPBody::Element::decode):
(WebKit::HTTPBody::decode):
(WebKit::FrameState::decode):
(WebKit::PageState::decode):
(WebKit::BackForwardListState::decode):
* Shared/SessionState.h:

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

5 years agoAddress a review comment.
andersca@apple.com [Sun, 22 Jun 2014 16:47:20 +0000 (16:47 +0000)]
Address a review comment.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::markInvalid):
(WebKit::decodeFormDataElement):

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

5 years agoImplement the rest of back forward tree decoding
andersca@apple.com [Sun, 22 Jun 2014 16:34:15 +0000 (16:34 +0000)]
Implement the rest of back forward tree decoding
https://bugs.webkit.org/show_bug.cgi?id=134166

Reviewed by Sam Weinig.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::decodeFormDataElement):
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):

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

5 years ago[iOS] WKWebViewConfiguration.allowsInlineMediaPlayback has no effect
mitz@apple.com [Sun, 22 Jun 2014 16:33:40 +0000 (16:33 +0000)]
[iOS] WKWebViewConfiguration.allowsInlineMediaPlayback has no effect
https://bugs.webkit.org/show_bug.cgi?id=134170

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Fixed a typo.

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

5 years agoDisable gamepad feature on EFL and GTK ports by default
gyuyoung.kim@samsung.com [Sun, 22 Jun 2014 05:52:59 +0000 (05:52 +0000)]
Disable gamepad feature on EFL and GTK ports by default
https://bugs.webkit.org/show_bug.cgi?id=134169

Reviewed by Brady Eidson.

EFL and GTK ports disabled Gamepad feature now. Besides current implementation
was treated to 'deprecated' status.

ENABLE_GAMEPAD_DEPRECATED is disabled for now. There is build break on EFL port.

* Scripts/webkitperl/FeatureList.pm:

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

5 years agocreateCairoGLSurface should take in a FloatSize reference as its first parameter
zandobersek@gmail.com [Sun, 22 Jun 2014 05:50:09 +0000 (05:50 +0000)]
createCairoGLSurface should take in a FloatSize reference as its first parameter
https://bugs.webkit.org/show_bug.cgi?id=134159

Reviewed by Martin Robinson.

The ImageBuffer constructor operates with a FloatSize reference, which is also
passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
That function should take in a reference to the same type.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::createCairoGLSurface):

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

5 years agoUnreviewed. Fixing the GTK+ build after r170253.
zandobersek@gmail.com [Sun, 22 Jun 2014 05:46:32 +0000 (05:46 +0000)]
Unreviewed. Fixing the GTK+ build after r170253.

* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate::_WebKitSettingsPrivate): WebPreferences::create()
now takes an additional String argument.

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