Should not export symbols for base64Encode inline adapter methods
https://bugs.webkit.org/show_bug.cgi?id=135355

Unreviewed build fix.

Fixes the build break introduced by r171682, where a base64Encode
inline adapter method was used in another header, thus creating
multiple definitions of it (and problems with with weak symbols).

* wtf/text/Base64.h: Remove WTF_EXPORT_PRIVATE for inlined methods.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac, iOS] Paint-on closed captions get out-of-order in Safari
https://bugs.webkit.org/show_bug.cgi?id=135332
<rdar://problem/15317278>

Reviewed by Brent Fulgham.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
number of active cues is greater than the current set of CSS boxes representing
the cues, throw away the CSS boxes and re-layout all the cues.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
(WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
newer cues earlier in the layout order so they are drawn towards the bottom
of the screen. Only do this for Generic captions.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
messages.
(WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac, iOS] Paint-on closed captions get out-of-order in Safari
https://bugs.webkit.org/show_bug.cgi?id=135332
<rdar://problem/15317278>

Reviewed by Jer Noble.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
number of active cues is greater than the current set of CSS boxes representing
the cues, throw away the CSS boxes and re-layout all the cues.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
(WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
newer cues earlier in the layout order so they are drawn towards the bottom
of the screen. Only do this for Generic captions.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
messages.
(WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<embed> videos flashes constantly while playing inline on iPad, making it unwatchable
https://bugs.webkit.org/show_bug.cgi?id=135356
<rdar://problem/16828238>

Reviewed by Simon Fraser.
        
The shadow tree for media controls is scheduling style recalc. The general silliness of
HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
tree reconstructions causing flicker.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
        
    Don't do the forced renderer reconstruction if there is no style change for the element
    or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
    update code path.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: m_heap->vm()->currentThreadIsHoldingAPILock()
https://bugs.webkit.org/show_bug.cgi?id=135352

Reviewed by Oliver Hunt.

* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): This should be taking a
JSLock like its sibling methods do (e.g. installReplacement).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB transactions never reset if the Web Process ends before cleaning up
https://bugs.webkit.org/show_bug.cgi?id=135218

Reviewed by Darin Adler.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::unregisterConnection):
(WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::didEstablishTransaction):
(WebKit::UniqueIDBDatabase::didResetTransaction):
(WebKit::UniqueIDBDatabase::resetAllTransactions):
(WebKit::UniqueIDBDatabase::finalizeRollback):
(WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] JIT::assertStackPointerOffset() crashes on ARM64
https://bugs.webkit.org/show_bug.cgi?id=135316

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-28
Reviewed by Geoffrey Garen.

JIT::assertStackPointerOffset() does a compare between an arbitrary register
and the stack pointer. This was not supported by the ARM64 assembler.

There are no variation that can take a stack pointer for Xd. There is one version of subs
that can take a stack pointer, but only for the Xn: the shift+extend one.
To solve the problem, I changed cmp to swap the registers if necessary, and I fixed
the implementation of sub.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::sub):
In the generic sub(reg, reg), I added assertions to catch the condition that cannot be generated
with either version of sub.

In sub(with shift), I remove the weird special case for SP. First, it was quite misleading because
the Rd case only works if "setflag == false". The other confusing part is going to addSubtractShiftedRegister()
gives you a reduce shift range, which could create subtle bug that only appear when SP is used.

Since I removed the weird case, I need to differentiate between the sub() that support SP, and the one that does
not elsewhere. That is why that branch has moved to the generic sub(reg, reg). Since at that point we know
the shift value must be zero, it is safe to call either variant.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branch64):
With the changes described above, we can now use SP for the left register. What do we do if the rightmost
register is SP?

For the case of JIT::assertStackPointerOffset(), the comparison is Equal so the order really does not matter,
we just switch the registers before generating the instruction.

For the generic case, just move the value of SP to a GPR before doing the CMP.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable tagged strings for the plugin process.
https://bugs.webkit.org/show_bug.cgi?id=135354
<rdar://problem/17295639>.

Patch by Alexey Proskuryakov and Roger Fong.

Reviewed by Anders Carlsson.

* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToReExecService):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
<rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363

Reviewed by Tim Horton.

Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.

r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.

* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readImage):

* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::ArchiveResource):
* loader/archive/ArchiveResource.h:
(WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
(WebCore::ArchiveResource::shouldLoadImmediately): Deleted.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

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