Timeline
Aug 16, 2015:
- 5:52 PM Changeset in webkit [188521] by
-
- 7 edits1 add in trunk/Source/WebKit2
Refactor ViewGestureController swipe snapshot removal to be more platform-independent
https://bugs.webkit.org/show_bug.cgi?id=148062
Reviewed by Dan Bernstein.
- Platform/Logging.h:
Add a ViewGestures logging channel.
- UIProcess/ViewGestureController.cpp: Added.
(viewGestureControllersForAllPages):
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::gestureControllerForPage):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::ViewGestureController::didRepaintAfterNavigation):
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::checkForActiveLoads):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
(WebKit::ViewGestureController::SnapshotRemovalTracker::log):
(WebKit::ViewGestureController::SnapshotRemovalTracker::start):
(WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
(WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
(WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
Build a platform-independent SnapshotRemovalTracker, which keeps track of
various events that we wait for before removing the snapshot. This
is constructed from the union of ViewGestureController{IOS, Mac}'s snapshot
removal code, and each platform ViewGestureController can specify which
events to wait for (because this currently differs slightly).
Add logging to SnapshotRemovalTracker to make debugging snapshot removal
issues much easier.
- UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didFailLoadForMainFrame):
- UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(viewGestureControllersForAllPages): Deleted.
(WebKit::ViewGestureController::ViewGestureController): Deleted.
(WebKit::ViewGestureController::~ViewGestureController): Deleted.
(WebKit::ViewGestureController::didRestoreScrollPosition): Deleted.
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
(WebKit::ViewGestureController::removeSwipeSnapshotIfReady): Deleted.
- UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::forceRepaintIfNeeded):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::ViewGestureController::ViewGestureController): Deleted.
(WebKit::ViewGestureController::~ViewGestureController): Deleted.
(WebKit::ViewGestureController::beginSwipeGesture): Deleted.
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): Deleted.
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Deleted.
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Deleted.
Move shareable snapshot removal code to a new platform-independent ViewGestureController file.
Move the ViewGestureController constructor/destructor to the platform-independent file.
- UIProcess/mac/ViewGestureController.messages.in:
- WebKit2.xcodeproj/project.pbxproj:
- 11:58 AM Changeset in webkit [188520] by
-
- 34 edits4 adds in trunk/Source/WebCore
Refactor HTMLCollection to be as fast as CachedLiveNodeList
https://bugs.webkit.org/show_bug.cgi?id=147979
Reviewed by Ryosuke Niwa and Antti Koivisto.
Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
preparation of having getElementsByTagName*() / getElementsByClassName()
return an HTMLCollection instead of a NodeList, as per the
specification. Chrome and Firefox already match the specification in
this case.
Traversing an HTMLCollection was slow because of all the extra
branching it had compared to CachedLiveNodeList. To address the issue,
this patch introduces a new templated CachedHTMLCollection subclass,
which behaves in a similar way as CachedLiveNodeList. The 2 template
parameters are:
- The type of the subclass of CachedHTMLCollection, so we can call elementMatches() directly on the subclass, without needed any virtual function call or switch statement. This is the same approach as in CachedLiveNodeList.
- The type of tree traversal used (Descendants, ChildrenOnly, CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to support these 3 types of tree traversal. These were causing extra branching for every item() call. We are now able to choose the right type of traversal for the CachedHTMLCollection at compile time.
- WebCore.xcodeproj/project.pbxproj:
Add new files to the Project.
- dom/ContainerNode.cpp:
(WebCore::ContainerNode::children):
(WebCore::ContainerNode::cachedHTMLCollection): Deleted.
- dom/ContainerNode.h:
Drop ContainerNode::ensureCachedHTMLCollection() and use
NodeListsNodeData::addCachedCollection() directly at call sites
instead. We need access to the CollectionType at build-time so
we can resolve the CollectionTraversalType parameter for the
GenericCachedHTMLCollection using CollectionTypeTraits.
- dom/Document.cpp:
- dom/Document.h:
Update ensureCachedCollection() so the CollectionType is now a template
parameter instead of a method argument. We need to know the
CollectionType at build time to construct the GenericCachedHTMLCollection.
- dom/ElementChildIterator.h:
(WebCore::ElementChildIterator<ElementType>::operator):
(WebCore::ElementChildConstIterator<ElementType>::operator):
Add support for decrementing an ElementChildIterator, for consistency
with ElementDescendantIterator. We need this to support backward
traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
of traversal.
- dom/LiveNodeList.h:
(WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
(WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
Move traversal implementation to CollectionTraversal.h, so it can be
shared with achedHTMLCollection.h.
- html/CachedHTMLCollection.h: Added.
(WebCore::traversalType>::CachedHTMLCollection):
(WebCore::traversalType>::~CachedHTMLCollection):
(WebCore::traversalType>::CachedHTMLCollection::memoryCost):
(WebCore::traversalType>::collectionCanTraverseBackward):
(WebCore::traversalType>::collectionTraverseForward):
(WebCore::traversalType>::collectionTraverseBackward):
(WebCore::traversalType>::willValidateIndexCache):
(WebCore::traversalType>::length):
(WebCore::traversalType>::item):
(WebCore::traversalType>::invalidateCache):
(WebCore::traversalType>::elementMatches):
(WebCore::nameShouldBeVisibleInDocumentAll):
(WebCore::traversalType>::namedItem):
- html/CollectionTraversal.h: Added.
Add new template class that provide the collection traversal code
needed by CollectionIndexCache. It has template specializations for
all 3 types of traversal: Descendants, ChildrenOnly, and
CustomForwardOnly.
- html/CollectionType.h:
Add CollectionTypeTraits traits so we can resolve the
CollectionTraversalType used by a specific CollectionType at
compile-time. This is needed for the second template parameter of
CachedHTMLCollection.
- html/GenericCachedHTMLCollection.cpp: Added.
(WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
- html/GenericCachedHTMLCollection.h: Added.
Add CachedHTMLCollection subclass is the generic one used for all
CollectionTypes that do not have their own subclass (e.g. NodeChildren).
This has an elementMatches() method with a switch() statement handling
all these CollectionTypes. Those are not normally not performance
sensitive.
- html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection):
- html/HTMLAllCollection.h:
Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
an elementMatches() method that simply returns true as we want to
match all elements.
- html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
Move CollectionIndexCache member to the subclass and drop the 2 other
members as they are replaced with the CollectionTraversalType template
parameter of CachedHTMLCollection.
(WebCore::HTMLCollection::~HTMLCollection):
Move Document::unregisterCollection() call to ~CachedHTMLCollection()
as we needed to check if the CollectionIndexCache was valid first.
(WebCore::HTMLCollection::updateNamedElementCache):
Move part of the implementation to the CachedHTMLCollection subclass
as it needs to know about the type of traversal and it needs to be
able to call elementMatches().
- html/HTMLCollection.h:
(WebCore::HTMLCollection::rootNode):
Inline for performance reasons and consistency with CachedLiveNodeList.
(WebCore::HTMLCollection::memoryCost):
Make virtual and move part of the implementation to the
CachedHTMLCollection subclass to compute the cost of the
CollectionIndexCache.
(WebCore::HTMLCollection::invalidateCache):
Move part of the implementation to the subclass to invalidate the
CollectionIndexCache.
- html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::elements):
- html/HTMLFormControlsCollection.cpp:
- html/HTMLFormControlsCollection.h:
Subclass CachedHTMLCollection instead of HTMLCollection.
customElementAfter() no longer needs to be virtual as it
is called directly by CachedHTMLCollection on the subclass.
- html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elements):
- html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::areas):
Call NodeListsNodeData::addCachedCollection() directly.
- html/HTMLNameCollection.cpp:
- html/HTMLNameCollection.h:
Subclass CachedHTMLCollection instead of HTMLCollection.
- html/HTMLOptionsCollection.cpp:
- html/HTMLOptionsCollection.h:
Subclass CachedHTMLCollection instead of HTMLCollection.
- html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectedOptions):
(WebCore::HTMLSelectElement::options):
- html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::rows):
(WebCore::HTMLTableElement::tBodies):
- html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::cells):
Call NodeListsNodeData::addCachedCollection() directly.
- html/HTMLTableRowsCollection.cpp:
- html/HTMLTableRowsCollection.h:
Subclass CachedHTMLCollection instead of HTMLCollection.
customElementAfter() no longer needs to be virtual as it
is called directly by CachedHTMLCollection on the subclass.
- html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::rows):
Call NodeListsNodeData::addCachedCollection() directly.
- 1:13 AM Changeset in webkit [188519] by
-
- 5 edits in trunk/Source/JavaScriptCore
[JSC] Use (x + x) instead of (x * 2) when possible
https://bugs.webkit.org/show_bug.cgi?id=148051
Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-08-16
Reviewed by Michael Saboff.
When multiplying a number by 2, JSC was loading a constant "2"
in register and multiplying it with the first number:
mov $0x4000000000000000, %rcx
movd %rcx, %xmm0
mulsd %xmm0, %xmm1
This is a problem for a few reasons.
1) "movd %rcx, %xmm0" only set half of XMM0. This instruction
has to wait for any preceding instruction on XMM0 to finish
before executing.
2) The load and transform itself is large and unecessary.
To fix that, I added a StrengthReductionPhase to transform
multiplications by 2 into a addition.
Unfortunately, that turned the code into:
movsd %xmm0 %xmm1
mulsd %xmm1 %xmm0
The reason is GenerationInfo::canReuse() was not accounting
for nodes using other nodes multiple times.
After fixing that too, we now have the multiplications by 2
done as:
addsd %xmm0 %xmm0
- dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::useCount):
(JSC::DFG::GenerationInfo::canReuse): Deleted.
- dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::FPRTemporary::FPRTemporary):
- dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::canReuse):
(JSC::DFG::GPRTemporary::GPRTemporary):
- dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
Aug 15, 2015:
- 8:46 PM Changeset in webkit [188518] by
-
- 2 edits in trunk/Source/WebCore
REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
https://bugs.webkit.org/show_bug.cgi?id=148063
Reviewed by Simon Fraser.
No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
- html/ImageDocument.cpp:
(WebCore::ImageEventListener::handleEvent):
Use <img>-relative coordinates, not document-relative coordinates,
because after r168327, the image can be centered.
- 8:29 PM Changeset in webkit [188517] by
-
- 12 edits in trunk
[Cocoa] Add redirect support to CustomProtocolManager
https://bugs.webkit.org/show_bug.cgi?id=147871
Reviewed by Dan Bernstein.
Source/WebKit2:
NSURLProtocols have the ability to generate redirect responses. This change teaches CustomProtocolManager how to handle them.
- Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::wasRedirectedToRequest): Called -URLProtocol:wasRedirectedToRequest:redirectResponse: on the NSURLProtocolClient.
- Shared/Network/CustomProtocols/CustomProtocolManager.h:
- Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Defined WasRedirectedToRequest.
- Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::wasRedirectedToRequest): Defined empty function.
- UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]): If a redirect response is received, send WasRedirectedToRequest and return nil to ignore the redirect.
Tools:
Updated WebKit2CustomProtocolsTest.MainResource to generate a redirect response.
- TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm:
(TestWebKitAPI::TEST): Unregesitered TestProtocol.
- TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html: Changed scheme to http.
- TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
(-[CustomProtocolsLoadDelegate browsingContextControllerDidStartProvisionalLoad:]): Expected a certain provisional URL.
(-[CustomProtocolsLoadDelegate browsingContextControllerDidReceiveServerRedirectForProvisionalLoad:]): Ditto.
(-[CustomProtocolsLoadDelegate browsingContextControllerDidCommitLoad:]): Expected a certain committed URL.
(-[CustomProtocolsLoadDelegate browsingContextControllerDidFinishLoad:]): Expected isLoading to be false.
(TestWebKitAPI::TEST): Used the new load delegate and unregistered TestProtocol.
- TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm:
(TestWebKitAPI::TEST): Unregistered TestProtocol.
- TestWebKitAPI/mac/TestProtocol.mm: Changed scheme to http.
(+[TestProtocol canInitWithRequest:]): Changed to use property syntax.
(-[TestProtocol startLoading]): Taught to handle redirect responses.
- 1:48 PM Changeset in webkit [188516] by
-
- 2 edits in branches/safari-601.1-branch/LayoutTests
Test result gardening. Removed obsolete expectations.
- platform/mac/TestExpectations:
- 1:42 PM Changeset in webkit [188515] by
-
- 2 edits in trunk/LayoutTests
Removed an expectation for http/tests/media/video-buffered-range-contains-currentTime.html,
which no longer times out. This expectation was conflicting with a correct one.
- platform/mac/TestExpectations:
- 1:13 PM Changeset in webkit [188514] by
-
- 8 edits5 adds in trunk
Have will-change create stacking context when necessary
https://bugs.webkit.org/show_bug.cgi?id=148060
Reviewed by Zalan Bujtas.
Source/WebCore:
If will-change includes a property whose non-initial value can create
stacking context, create stacking context for that element.
Test: fast/css/will-change/will-change-creates-stacking-context.html
- css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
- rendering/style/RenderStyle.h: Add willChangeCreatesStackingContext(),
which on most cases is a fast, inlined 'return false'. Otherwise ask
the WillChangeData.
- rendering/style/WillChangeData.cpp:
(WebCore::propertyCreatesStackingContext):
(WebCore::WillChangeData::createsStackingContext):
- rendering/style/WillChangeData.h:
LayoutTests:
Ref test for will-change creating stacking context.
- fast/css/will-change/resources/will-change-stacking-helper.js: Added.
(makeStackingBlock):
- fast/css/will-change/will-change-creates-stacking-context-expected.html: Added.
- fast/css/will-change/will-change-creates-stacking-context.html: Added.
- platform/efl/TestExpectations: Mark image failure on EFL, since some CSS
properties in the test are disabled there.
- 11:09 AM Changeset in webkit [188513] by
-
- 31 edits4 deletes in trunk/Source/WebCore
Unreviewed, rolling out r188508.
https://bugs.webkit.org/show_bug.cgi?id=148058
Caused 10 tests to crash (Requested by smfr on #webkit).
Reverted changeset:
"Refactor HTMLCollection to be as fast as CachedLiveNodeList"
https://bugs.webkit.org/show_bug.cgi?id=147979
http://trac.webkit.org/changeset/188508
- 10:59 AM Changeset in webkit [188512] by
-
- 18 edits4 adds in trunk
Implement parsing for CSS will-change
https://bugs.webkit.org/show_bug.cgi?id=148052
Reviewed by Dean Jackson.
Source/WebCore:
Syntax is
will-change: auto | <animateable-feature>#
where
<animateable-feature> = scroll-position | contents | <custom-ident>
To support this, add WillChangeData which stores a vector of "feature"
and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
If null or an empty list, the property value is 'auto'. The list preserves
unknown properties.
Test: fast/css/will-change-parsing.html
- CMakeLists.txt:
- WebCore.vcxproj/WebCore.vcxproj:
- WebCore.vcxproj/WebCore.vcxproj.filters:
- WebCore.xcodeproj/project.pbxproj:
- css/CSSComputedStyleDeclaration.cpp:
(WebCore::getWillChangePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
- css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
since it's grid-specific.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
(WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
"initial", "inherit" and "default".
(WebCore::CSSParser::parseFontFamily):
(WebCore::isValidWillChangeAnimatableFeature):
(WebCore::CSSParser::parseWillChange):
(WebCore::isValidCustomIdent): Deleted.
- css/CSSParser.h:
- css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
- css/CSSPropertyNames.in:
- css/CSSValueKeywords.in:
- css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWillChange):
- rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWillChange):
- rendering/style/RenderStyle.h:
- rendering/style/StyleAllInOne.cpp:
- rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
- rendering/style/StyleRareNonInheritedData.h:
- rendering/style/WillChangeData.cpp: Added.
(WebCore::WillChangeData::operator==):
(WebCore::WillChangeData::containsScrollPosition):
(WebCore::WillChangeData::containsContents):
(WebCore::WillChangeData::containsProperty):
(WebCore::WillChangeData::addFeature):
(WebCore::WillChangeData::featureAt):
- rendering/style/WillChangeData.h: Added.
(WebCore::WillChangeData::create):
(WebCore::WillChangeData::operator!=):
(WebCore::WillChangeData::isAuto):
(WebCore::WillChangeData::numFeatures):
(WebCore::WillChangeData::WillChangeData):
(WebCore::WillChangeData::AnimatableFeature::feature):
(WebCore::WillChangeData::AnimatableFeature::property):
(WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
(WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
(WebCore::WillChangeData::AnimatableFeature::operator==):
LayoutTests:
will-change parsing test.
- fast/css/will-change-parsing-expected.txt: Added.
- fast/css/will-change-parsing.html: Added.
- 10:57 AM Changeset in webkit [188511] by
-
- 2 edits in trunk/Source/WebCore
Build fix after r188510
- platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton): Pass a raw pointer to drawCellOrFocusRingWithViewIntoContext.
- 10:50 AM Changeset in webkit [188510] by
-
- 5 edits in trunk/Source/WebCore
Search fields should scale when rendering while zoomed
https://bugs.webkit.org/show_bug.cgi?id=147867
Reviewed by Daniel Bates.
When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
(paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
- rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
- rendering/RenderThemeMac.mm:
(WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
- rendering/RenderThemeMac.h:
- rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
(WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
both selects and search fields.
(WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
to render search fields, utilizing an offscreen image buffer only when necessary.