Unreviewed, rolling out r103619.
http://trac.webkit.org/changeset/103619
https://bugs.webkit.org/show_bug.cgi?id=66509

Broke chromium clang build

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebCommonWorkerClient.h:
(WebKit::WebCommonWorkerClient::postConsoleMessageToWorkerObject):
(WebKit::WebCommonWorkerClient::allowFileSystem):
(WebKit::WebCommonWorkerClient::openFileSystem):
(WebKit::WebCommonWorkerClient::dispatchDevToolsMessage):
(WebKit::WebCommonWorkerClient::saveDevToolsAgentState):
(WebKit::WebCommonWorkerClient::~WebCommonWorkerClient):
* public/WebSharedWorker.h:
* public/WebSharedWorkerClient.h: Removed.
* public/WebWorkerClient.h:
(WebKit::WebWorkerClient::~WebWorkerClient):
* src/DatabaseObserver.cpp:
(WebKit::AllowDatabaseMainThreadBridge::create):
(WebKit::AllowDatabaseMainThreadBridge::AllowDatabaseMainThreadBridge):
(WebKit::AllowDatabaseMainThreadBridge::allowDatabaseTask):
(WebKit::allowDatabaseForWorker):
(WebCore::DatabaseObserver::canEstablishDatabase):
* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::openFromWorker):
* src/LocalFileSystemChromium.cpp:
(WebCore::openFileSystemHelper):
* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::WebSharedWorkerImpl):
(WebKit::WebSharedWorkerImpl::~WebSharedWorkerImpl):
(WebKit::WebSharedWorkerImpl::client):
(WebKit::WebSharedWorker::create):
* src/WebSharedWorkerImpl.h:
(WebKit::WebSharedWorkerImpl::commonClient):
(WebKit::WebSharedWorkerImpl::newCommonClient):
* src/WebWorkerBase.cpp:
(WebKit::initializeWebKitStaticValues):
(WebKit::WebWorkerBase::WebWorkerBase):
(WebKit::WebWorkerBase::~WebWorkerBase):
(WebKit::WebWorkerBase::stopWorkerThread):
(WebKit::WebWorkerBase::initializeLoader):
(WebKit::WebWorkerBase::dispatchTaskToMainThread):
(WebKit::WebWorkerBase::invokeTaskMethod):
(WebKit::WebWorkerBase::didCreateDataSource):
(WebKit::WebWorkerBase::createApplicationCacheHost):
(WebKit::WebWorkerBase::postMessageToWorkerObject):
(WebKit::WebWorkerBase::postMessageTask):
(WebKit::WebWorkerBase::postExceptionToWorkerObject):
(WebKit::WebWorkerBase::postExceptionTask):
(WebKit::WebWorkerBase::postConsoleMessageToWorkerObject):
(WebKit::WebWorkerBase::postConsoleMessageTask):
(WebKit::WebWorkerBase::postMessageToPageInspector):
(WebKit::WebWorkerBase::postMessageToPageInspectorTask):
(WebKit::WebWorkerBase::updateInspectorStateCookie):
(WebKit::WebWorkerBase::updateInspectorStateCookieTask):
(WebKit::WebWorkerBase::confirmMessageFromWorkerObject):
(WebKit::WebWorkerBase::confirmMessageTask):
(WebKit::WebWorkerBase::reportPendingActivity):
(WebKit::WebWorkerBase::reportPendingActivityTask):
(WebKit::WebWorkerBase::workerContextClosed):
(WebKit::WebWorkerBase::workerContextClosedTask):
(WebKit::WebWorkerBase::workerContextDestroyed):
(WebKit::WebWorkerBase::workerContextDestroyedTask):
(WebKit::WebWorkerBase::postTaskToLoader):
(WebKit::WebWorkerBase::postTaskForModeToWorkerContext):
* src/WebWorkerBase.h:
(WebKit::WebWorkerBase::view):
(WebKit::WebWorkerBase::setWorkerThread):
(WebKit::WebWorkerBase::workerThread):
* src/WebWorkerClientImpl.cpp:
* src/WebWorkerClientImpl.h:
(WebKit::WebWorkerClientImpl::newCommonClient):
* src/WebWorkerImpl.cpp: Added.
(WebKit::WebWorker::create):
(WebKit::WebWorkerImpl::WebWorkerImpl):
(WebKit::WebWorkerImpl::~WebWorkerImpl):
(WebKit::WebWorkerImpl::newCommonClient):
(WebKit::WebWorkerImpl::commonClient):
(WebKit::WebWorkerImpl::postMessageToWorkerContextTask):
(WebKit::WebWorkerImpl::startWorkerContext):
(WebKit::WebWorkerImpl::terminateWorkerContext):
(WebKit::WebWorkerImpl::postMessageToWorkerContext):
(WebKit::WebWorkerImpl::workerObjectDestroyed):
(WebKit::WebWorkerImpl::clientDestroyed):
* src/WebWorkerImpl.h: Copied from Source/WebKit/chromium/src/WebWorkerBase.cpp.
(WebKit::WebWorkerImpl::client):
* src/WorkerFileSystemCallbacksBridge.cpp:
(WebKit::WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread):
(WebKit::WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread):
* src/WorkerFileSystemCallbacksBridge.h:

Tools:

* DumpRenderTree/chromium/TestWebWorker.h:
(TestWebWorker::createWorker):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::createWorker):
* DumpRenderTree/chromium/WebViewHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make build-webkit aware of additional Xcode build location defaults.

Reviewed by Anders Carlsson.

* Scripts/webkitdirs.pm:
(determineXcodeVersion): Added. This was previously in determineBaseProductDir().
(readXcodeUserDefault): Added. Factored out from determineBaseProductDir().
(determineBaseProductDir): Changed to check for a custom build location
style specified as an absolute location.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove empty inline RenderStyle destructor.
<http://webkit.org/b/75188>

Rubber-stamped by Anders "Ordvits" Carlsson.

* rendering/style/RenderStyle.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow XMLHttpRequest withCredentials to be set prior to a call to open()
https://bugs.webkit.org/show_bug.cgi?id=75194

Source/WebCore:

XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per
the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute

Reviewed by Alexey Proskuryakov.

Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setWithCredentials):
Prevent setting the value only after the OPENED state.

LayoutTests:

Reviewed by Alexey Proskuryakov.

* fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html: Added.
Validate that XMLHttpRequest.withCredentials can be set prior to a call to open().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Set SHARED_PRECOMPS_DIR when Xcode is set to use a custom build product path.

Reviewed by Anders Carlsson.

* Scripts/webkitdirs.pm:
(determineBaseProductDir):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Decouple CSSMappedAttributeDeclaration from element completely.
<http://webkit.org/b/75187>

Reviewed by Darin Adler.

Let CSSMappedAttributeDeclaration inherit from CSSMutableDeclaration instead
of CSSElementStyleDeclaration. Add methods to CSSMappedAttributeDeclaration
for setting properties that also take a StyledElement* and use that mechanism
instead of temporarily associating an element with the declaration.

This reduces the size of mapped attributes by 4/8 bytes, but more importantly
opens a number of ways to simplify style declarations in future patches.

* css/CSSMutableStyleDeclaration.h:
* dom/CSSMappedAttributeDeclaration.cpp:
(WebCore::CSSMappedAttributeDeclaration::setNeedsStyleRecalc):
(WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty):
(WebCore::CSSMappedAttributeDeclaration::setMappedLengthProperty):
(WebCore::CSSMappedAttributeDeclaration::setMappedProperty):
(WebCore::CSSMappedAttributeDeclaration::removeMappedProperty):
* dom/CSSMappedAttributeDeclaration.h:
(WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):

    Add/move methods to CSSMappedAttributeDeclaration for setting/removing
    properties that also take a StyledElement*. That element is used for
    scheduling style recalc and passing the right document to CSSParser.

* css/CSSParser.h:
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseMappedAttributeValue):

    Added a parsedMappedAttributeValue() alternative to parseValue() that
    takes a StyledElement*.

* dom/StyledElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):

    Add (and use) a StyledElement::removeCSSProperty() complement to the
    addCSS*() functions.

* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::removeCSSProperty):
(WebCore::StyledElement::addCSSProperty):
(WebCore::StyledElement::addCSSImageProperty):
(WebCore::StyledElement::addCSSLength):
(WebCore::StyledElement::addCSSColor):
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):

    Use the setMapped*Property() functions to plumb the element through.

* css/CSSElementStyleDeclaration.h:

    Update comment about CSSElementStyleDeclaration's subclasses.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSElementStyleDeclarations should never move between elements.
<http://webkit.org/b/75198>

Reviewed by Anders Carlsson.

Have the CSSElementStyleDeclaration subclasses take a StyledElement* in
the constructor and replace setElement(StyledElement*) by clearElement().

No behavior change, just enforcing the current behavior at compile-time.

* css/CSSElementStyleDeclaration.h:
(WebCore::CSSElementStyleDeclaration::clearElement):
(WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
* css/CSSInlineStyleDeclaration.h:
(WebCore::CSSInlineStyleDeclaration::create):
(WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration):
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::destroyInlineStyleDecl):
* svg/SVGFontFaceElement.cpp:
(WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Specialize HashTraits for RefPtr to use PassRefPtr as "pass type" to reduce reference count churn
https://bugs.webkit.org/show_bug.cgi?id=72476

Reviewed by Sam Weinig.

* wtf/HashTraits.h: Defined PassInType and store function in HashTraits<RefPtr>.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Set the svn:mime-type property of some PNG files to image/png

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add unittests for the Python parser of prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=75197

Reviewed by Ryosuke Niwa.

python_unittests.py is the unittest for get_function_line_ranges_for_python()
of prepare-ChangeLog. The unittest just contains classes and defs that are not nested.
This is because the current python parser is wrong, and it cannot correctly parse nested
classes and defs (even one def in a class), nor class inheritance.
We will fix it in another patch.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_python): Ignores comment lines that starts from #.
* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt: Added.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py: Added.
(func1):
(func2):
(func3):
(funcInsideComment):
(func4):
(func5):
(func6):
(funcOverloaded):
(Class1):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add unittests for the Java parser of prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=75195

Reviewed by Ryosuke Niwa.

java_unittests.java is unittest cases for get_function_line_ranges_for_java()
of prepare-ChangeLog.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_java): Fixed a parser bug.

    interface I
    {
        void f()
        {
        }
    }

should be recognized as "I.f", and

    class C interface I
    {
        void f()
        {
        }
    }

should be recognized as "C.f".
Without this patch, both are recognized as "I.f".

* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/java_unittests-expected.txt: Added.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/java_unittests.java: Added.
(Simple):
(Simple.func1):
(Simple.func2):
(Simple.func3):
(Simple.func4):
(Simple.func5):
(Simple.func6):
(Simple.func7):
(Simple.func8):
(Simple.func9):
(Simple.func10):
(Simple.funcOverloaded):
(Simple.func11):
(Simple.func12):
(Simple.func13):
(Simple.func14):
(Simple.func15):
(Simple.func16):
(Simple.func17):
(Simple.func18):
(Simple.func19):
(Simple.func20):
(Simple.func21):
(Derived1):
(Derived1.Derived1):
(Derived1.func22):
(Interface1):
(Interface2):
(Interface2.func23):
(Derived2):
(Derived2.Derived2):
(Derived2.func23):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add unittests for the C++ parser of prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=75191

Reviewed by Ryosuke Niwa.

cpp_unittests.cpp is the unittests for get_function_line_ranges_for_cpp()
of prepare-ChangeLog.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges): Renames get_function_line_ranges_for_c()
to get_function_line_ranges_for_cpp().
* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt: Added.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp: Added.
(func1):
(func2):
(func3):
(func4):
(func5):
(func6):
(func7):
(func8):
(func9):
(func10):
(func11):
(func12):
(func13):
(func14):
(func15):
(funcOverloaded):
(Class::func16):
(Class1::Class2::func17):
(Class2::func18):
(Class2::func19):
(Class2::func20):
(Class2::func21):
(Class2::func22):
(func23):
(func24):
(Class2::func25):
(Class1::func26):
(Class2::func27):
(Class3::func28):
(Class7::operator+):
(Class100::Class100):
(Class101::~Class101):
(Class102::Class102):
(Class103::Class103):
(Struct1::func29):
(Struct2::func30):
(NameSpace1::func30):
(NameSpace1::NameSpace2::func31):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* gtest/xcode/gtest.xcodeproj: Added property svn:ignore.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change CSS canvas code that does HashMap get/set to use the more efficient add idiom
https://bugs.webkit.org/show_bug.cgi?id=75204

Reviewed by Dan Bernstein.

* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext): Change local variable name of element to
element; it's not the function result, so not good to name it result.
(WebCore::Document::getCSSCanvasElement): Use add instead of get/set so we only do
one hash table lookup.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Yarr: Avoid copying vectors in CharacterClassConstructor.
<http://webkit.org/b/75206>

Reviewed by Darin Adler.

Yarr::CharacterClassConstructor::charClass() was hot when loading twitter
feeds (1.2%), replace the usage of Vector::append() by swap() since we're
always clearing the source vector afterwards anyway.

* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::charClass):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix tests failing as a result of r103643
https://bugs.webkit.org/show_bug.cgi?id=75209

Reviewed by Dan Bernstein.

Switch accidental switch of default scroll granularity from 
ScrollByPageWheelEvent back to ScrollByPixelWheelEvent.

* platform/mac/PlatformEventFactory.mm:
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The ArgumentCount field in the CallFrame should have its tag left blank for other uses
https://bugs.webkit.org/show_bug.cgi?id=75199
<rdar://problem/10625105>
<rdar://problem/10625106>

Reviewed by Oliver Hunt.

* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::argumentPayloadSlot):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* interpreter/CallFrame.h:
(JSC::ExecState::argumentCountIncludingThis):
(JSC::ExecState::setArgumentCountIncludingThis):
* interpreter/Register.h:
(JSC::Register::unboxedInt32):
(JSC::Register::unboxedBoolean):
(JSC::Register::unboxedCell):
(JSC::Register::payload):
(JSC::Register::tag):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):
(JSC::JIT::compileOpCall):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow XMLHttpRequest responseType to be set at any state up to and including HEADERS_RECEIVED
https://bugs.webkit.org/show_bug.cgi?id=75190

Source/WebCore:

XMLHttpRequest.responseType should be modifiable at any state up to and including the
HEADERS_RECEIVED state. Therefore, subsequent calls to open() should not reset responseType
to its default value, and calls to open() must follow the same spec mandate set forth in
setResponseType() for synchronous HTTP(S) requests made from the window context.

Reviewed by Alexey Proskuryakov.

Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html
       fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html
       fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setResponseType):
Prevent setting the value only when in LOADING and DONE states. No longer check if
m_loader is present, which is instantiated on a call to send(), because responseType
can be safely changed after a request is sent.
(WebCore::XMLHttpRequest::open):
Do not reset m_responseTypeCode to the default value, and prevent calls to open()
for synchronous HTTP(S) requests made from the window context when m_responseTypeCode
is not the default value.

LayoutTests:

Reviewed by Alexey Proskuryakov.

* fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html: Added.
Validate that calls to open() for synchronous HTTP(S) requests from the window context will
properly fail when responseType has been previously set to a non-default value.
* fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html: Added.
Validate that XMLHttpRequest.responseType can be set prior to a call to open().
* fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received-expected.txt: Added.
* fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html: Added.
Validate that XMLHttpRequest.responseType can be set at the HEADERS_RECEIVED state, but
no state later than that.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use OwnPtr for CSSFontFace::m_sources
https://bugs.webkit.org/show_bug.cgi?id=75219

Reviewed by Dan Bernstein.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::isLoaded): Use the same size_t idiom here as in the rest
of the functions.
(WebCore::CSSFontFace::isValid): Ditto. Also removed unneeded empty special casing.
(WebCore::CSSFontFace::addSource): Changed to take a PassOwnPtr. Reordered so the
PassOwnPtr zeroing does not cause trouble.
(WebCore::CSSFontFace::getFontData): Added call to get.
(WebCore::CSSFontFace::hasSVGFontFaceSource): Use the same size_t idiom here as in
the rest of the functions.

* css/CSSFontFace.h: Use PassOwnPtr for addSource argument, and Vector<OwnPtr> for
the m_sources vector.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Use OwnPtr and PassOwnPtr for font face
sources that are passed to addSource.

* css/CSSSegmentedFontFace.cpp: Added a now-needed include.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
../WebCore: WebCore changes for: Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220

Reviewed by Darin Adler.

* WebCore.exp.in: Exported new unionRect(const Vector<FloatRect>&) and existing
FloatRect::intersects().
* platform/graphics/FloatRect.cpp:
(WebCore::unionRect): Added.
* platform/graphics/FloatRect.h:

../WebKit2: Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220

Reviewed by Darin Adler.

* UIProcess/FindIndicator.cpp:
(WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for
pairwise intersections between all indicator rects.
(WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text
rects) if any two indicator rects would otherwise overlap. This is similar to what Safari
does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when
a match spans two lines and adjacent text boxes on one of those lines) it results in a find
indicator that is too large and obscures some non-match text.
* UIProcess/FindIndicator.h:



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