[EFL] build break occurs on webkit efl build.
https://bugs.webkit.org/show_bug.cgi?id=137844

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2014-10-18
Reviewed by Gyuyoung Kim.

As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.

No new tests because it's just to fix build break.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Tables with <colgroups> are not reporting table column headers
https://bugs.webkit.org/show_bug.cgi?id=137846

Reviewed by Mario Sanchez Prada.

Source/WebCore:

The code to search for header objects was getting stuck on anonymous RenderTableSections.
We also need to check more rows for headers, in case the first row or more is not visible or is empty.

Test: accessibility/table-column-headers-with-captions.html

* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::headerObjectForSection):

LayoutTests:

* accessibility/table-column-headers-with-captions-expected.txt: Added.
* accessibility/table-column-headers-with-captions.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Improve documentation of webkit_web_view_get_tls_info()
https://bugs.webkit.org/show_bug.cgi?id=137852

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-10-18
Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebView.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Use Fast enumeration consistently in WebFontCache.mm
https://bugs.webkit.org/show_bug.cgi?id=137791

Reviewed by Darin Adler.

Use fast enumeration consistently in WebFontCache.mm as this results in
more efficient, concise and safer code.

No new tests, no behavior change.

* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
Reserve Vector capacity before the loop as we know how many traits we
are going to append. Also use uncheckedAppend() for performance.

(+[WebFontCache internalFontWithFamily:traits:weight:size:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Replay: code generator shouldn't complain about enums without a storage type if they are in an enclosing scope
https://bugs.webkit.org/show_bug.cgi?id=137084

Reviewed by Joseph Pecoraro.

In order to generate encode/decode method declarations without pulling in lots of headers,
the generator must forward declare enums (for enum classes or enums with explicit sizes).

Change the generator to not require an explicit size if an enum is declared inside a struct
or class definition. In that case, it must pull in headers since scoped enums can't be
forward declared.

This patch also fixes some chained if-statements that should be if-else statements.

Test: updated replay/scripts/tests/generate-enum-encoding-helpers.json to cover the new case.

* replay/scripts/CodeGeneratorReplayInputs.py:
(InputsModel.parse_type_with_framework_name.is):
(InputsModel.parse_type_with_framework_name.is.must):
(Generator.generate_enum_trait_implementation):
(InputsModel.parse_type_with_framework_name): Deleted.
* replay/scripts/CodeGeneratorReplayInputsTemplates.py:
* replay/scripts/tests/expected/fail-on-c-style-enum-no-storage.json-error:
* replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
(JSC::EncodingTraits<WebCore::PlatformEvent::Type>::encodeValue):
(JSC::EncodingTraits<WebCore::PlatformEvent::Type>::decodeValue):
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:
* replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp:
(JSC::EncodingTraits<WebCore::FormData1::Type>::decodeValue):
(JSC::EncodingTraits<PlatformEvent1::Type>::decodeValue):
* replay/scripts/tests/generate-enum-encoding-helpers.json: Added a new input to cover this case.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WorkQueue dispatches functions but isn’t a FunctionDispatcher
https://bugs.webkit.org/show_bug.cgi?id=137853

Reviewed by Anders Carlsson.

Source/WebKit2:

* Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.

Source/WTF:

* wtf/FunctionDispatcher.h: Added header guards.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Repaint issues with accelerated compositing.
https://bugs.webkit.org/show_bug.cgi?id=137850

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-18
Reviewed by Brent Fulgham.

There is sometimes missing content in accelerated compositing mode.
This is caused by not invalidating the non composited layer,
and not rendering when a flush did not complete.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::flushAndRenderLayers): Also render when flush did not complete.
(AcceleratedCompositingContext::setNeedsDisplayInRect): Deleted.
* WebCoreSupport/AcceleratedCompositingContext.h: Ditto.
* WebView.cpp:
(WebView::addToDirtyRegion): Invalidate non composited layer.
(WebView::flushPendingGraphicsLayerChanges): Flush layers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
https://bugs.webkit.org/show_bug.cgi?id=137855

Reviewed by Dan Bernstein.

Source/WebCore:

We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
backchannel data that the synthesized response doesn't have.

Test: http/tests/mime/mime-type-sniff.html

* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):

    When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.

Tools:

Test and warn if the dumped response mime type differs from the platform response mime type.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReceiveResponseForResource):
(WTR::InjectedBundlePage::platformResponseMimeType):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::platformResponseMimeType):

LayoutTests:

* http/tests/mime/mime-type-sniff-expected.txt: Added.
* http/tests/mime/mime-type-sniff.html: Added.
* http/tests/mime/resources/png-with-text-content-type.cgi: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Style fix following r174855.

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137422

Reviewed by Martin Robinson.

Source/WebCore:

Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.

* PlatformGTK.cmake:
* platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
* platform/gtk/ClipboardUtilitiesGtk.h: Removed.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed.
* platform/gtk/GtkDragAndDropHelper.h: Removed.

Source/WebKit2:

WebKitWebViewBase is currently the only user of
GtkDragAndDropHelper, that was added to share the code with
WebKit1. Move all the drag and drop logic to a new class
DragAndDropHandler.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::startDrag):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewBaseDragDataGet):
(webkitWebViewBaseDragEnd):
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
(webkitWebViewBaseDragLeave):
(webkitWebViewBaseDragDrop):
(webkitWebViewBaseDragAndDropHandler):
(dragExitedCallback): Deleted.
(webkitWebViewBaseStartDrag): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/DragAndDropHandler.cpp: Added.
(WebKit::DragAndDropHandler::create):
(WebKit::DragAndDropHandler::DragAndDropHandler):
(WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
(WebKit::dragOperationToGdkDragActions):
(WebKit::dragOperationToSingleGdkDragAction):
(WebKit::gdkDragActionToDragOperation):
(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::finishDrag):
(WebKit::DragAndDropHandler::dataObjectForDropData):
(WebKit::DragAndDropHandler::dragEntered):
(WebKit::DragAndDropHandler::requestDragData):
(WebKit::DragAndDropHandler::dragMotion):
(WebKit::DragAndDropHandler::dragLeave):
(WebKit::DragAndDropHandler::drop):
* UIProcess/gtk/DragAndDropHandler.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
https://bugs.webkit.org/show_bug.cgi?id=137854

Reviewed by Darin Adler.

Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
custom toRenderScrollbar() function, for consistency.

No new tests, no behavior change.

* rendering/RenderScrollbar.h:
(isType):
(WebCore::toRenderScrollbar): Deleted.
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::minimumThumbLength):
(WebCore::RenderScrollbarTheme::backButtonRect):
(WebCore::RenderScrollbarTheme::forwardButtonRect):
(WebCore::RenderScrollbarTheme::trackRect):
(WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
(WebCore::RenderScrollbarTheme::paintScrollbarBackground):
(WebCore::RenderScrollbarTheme::paintTrackBackground):
(WebCore::RenderScrollbarTheme::paintTrackPiece):
(WebCore::RenderScrollbarTheme::paintButton):
(WebCore::RenderScrollbarTheme::paintThumb):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845

Reviewed by Darin Adler.

Source/WebCore:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

No new tests, no behavior change.

* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::layoutCount):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* dom/Document.cpp:
(WebCore::widgetForElement):
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* editing/FrameSelection.cpp:
(WebCore::isFrameElement):
* html/HTMLEmbedElement.cpp:
(WebCore::findWidgetRenderer):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::renderWidget):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::widgetForEventTarget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
* rendering/RenderCombineText.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::setNeedsPositionedMovementLayout):
(WebCore::RenderElement::renderNamedFlowThreadWrapper):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::isRestartedPlugin):
(WebCore::isCompositedPlugin):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::layout):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
(WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
(WebCore::RenderObject::setLayerNeedsFullRepaint):
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::selectionRoot):
(WebCore::RenderObject::shouldUseTransformFromContainer):
(WebCore::RenderObject::getTransformFromContainer):
(WebCore::RenderObject::isRooted):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::isComposited):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderRuby.cpp:
(WebCore::lastRubyRun):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::rubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/RenderSlider.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore::writeLayers):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::isComposited):
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):

Source/WebKit/mac:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView pluginHostDied]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView _windowClipRect]):
(-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):

Source/WebKit2:

Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Kill toRenderedDocumentMarker() by using tighter typing
https://bugs.webkit.org/show_bug.cgi?id=137858

Reviewed by Darin Adler.

Source/WebCore:

Kill toRenderedDocumentMarker() by using tighter typing. This method
was doing no type validation, just a static_cast<>().

No new tests, no behavior change.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::markersFor):
(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
* dom/DocumentMarkerController.h:
* dom/RenderedDocumentMarker.h:
(WebCore::toRenderedDocumentMarker): Deleted.
* editing/AlternativeTextController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::copyMarkers):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::selectionStartHasMarkerFor):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerAt):
(WebCore::Internals::markerRangeForNode):
(WebCore::Internals::markerDescriptionForNode):
* testing/Internals.h:

Source/WebKit:

Update symbol export for Windows due to argument type change.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
https://bugs.webkit.org/show_bug.cgi?id=137869

Reviewed by Darin Adler.

Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.

Previously, when accessing document.cookie, we ended up doing the following:
1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
2. Call filterCookies() to filter out cookies that are httpOnly or with an
   empty name, thus allocating a new NSMutableArray.
3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
   cookies
4. Construct a WTF::String from the NSString*

There were several inefficiencies here:
1. We needed to pre-filter the cookies and allocate a new NSMutableArray
   before calling requestHeaderFieldsWithCookies()
2. requestHeaderFieldsWithCookies() does more things that we actually need.
   It constructs a Dictionary of header fields, of which we query the
   "Cookie" field, even though we merely want a ';'-separated string
   representation of the cookies in "key=value" form.

With this patch, we now take care of the string serialization ourselves,
using a StringBuilder as it is trivial to do. This also allows us to filter
out the httpOnly/invalid cookies as we do the serialization instead of
having a first pass to do so.

When scrolling the http://www.apple.com/iphone/ entire page down, then up,
se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
(~96ms) on my machine. With the patch, we spend ~23% less time in
cookiesForDOM() (~74ms).

No new tests, no behavior change.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the <link>'s link status
https://bugs.webkit.org/show_bug.cgi?id=137861

Reviewed by Chris Dumez.

Source/WebCore:

In the latest HTML spec, <link> has the link status
if it has a 'href' attribute, exactly like <a> and <area>:
    https://html.spec.whatwg.org/multipage/scripting.html#selector-link

This patch updates WebKit accordingly.

Tests: fast/css/link-basics.html
       fast/selectors/link-basics-xhtml.xhtml
       fast/selectors/link-basics.html
       fast/selectors/webkit-any-link-basics.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):

LayoutTests:

* fast/css/link-basics-expected.html: Added.
* fast/css/link-basics.html: Added.
* fast/selectors/link-basics-expected.txt: Added.
* fast/selectors/link-basics-xhtml-expected.txt: Added.
* fast/selectors/link-basics-xhtml.xhtml: Added.
* fast/selectors/link-basics.html: Added.
* fast/selectors/resources/html-link-type-tests.js: Added.
(testHTMLElement):
(testHTMLTagsForLink):
* fast/selectors/webkit-any-link-basics-expected.txt: Added.
* fast/selectors/webkit-any-link-basics.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][Minibrowser] Escape key does not hide the search box
https://bugs.webkit.org/show_bug.cgi?id=137734

Patch by Tanay C <tanay.c@samsung.com> on 2014-10-20
Reviewed by Philippe Normand.

* MiniBrowser/gtk/BrowserWindow.c: Added the check to handle search box hide
(stopPageLoad): Modified.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add initial gestures support
https://bugs.webkit.org/show_bug.cgi?id=137812

Reviewed by Sergio Villar Senin.

.:

Check if the GTK+ version supports gestures or not.

* Source/cmake/FindGTK3.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

Now that GTK+ has support for gestures, we can use it to handle
touch events and allow to scroll, zoom and tap with the fingers.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
hasn't been handled by the web process pass it to the
GestureController and only fallback to pointer emulation when the
GestureController doesn't handle the event.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchEvent): If the GestureController is
currently processing gestures is because the START touch event was
not handled by the web process, so pass any successive touch
events to the GestureController directly.
(webkitWebViewBaseGestureController): Create the GestureController
on demand and return a reference.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/GestureController.cpp: Added.
(WebKit::GestureController::create): Create a GestureController.
(WebKit::GestureController::GestureController): Initialize the
Gesture memebers.
(WebKit::GestureController::handleEvent): Pass the event to the gestures.
(WebKit::GestureController::isProcessingGestures): Whether
Gestures are active.
(WebKit::GestureController::Gesture::Gesture): Base class for gestures.
(WebKit::GestureController::Gesture::isActive): Whether the
gesture is active.
(WebKit::GestureController::Gesture::handleEvent): Pass the event
to the GtkGesture to process it.
(WebKit::GestureController::DragGesture::handleDrag): Send a wheel
event corresponding to the drag gesture to the web process.
(WebKit::GestureController::DragGesture::handleTap): Send move,
press and release events corresponding to a tap gesture to the web process.
(WebKit::GestureController::DragGesture::begin): Start a drag
gesture and schedule a timer to discard tap gesture in case of
long press.
(WebKit::GestureController::DragGesture::update): If the actual
drag hasn't started yet, check the drag threshold to decide
whether to start the drag or not. Otherwise call handleDrag() to
send the appropriate events to the web process.
(WebKit::GestureController::DragGesture::end): If the drag gesture
finishes and the drag didn't happen (it wasn't a long press and
drag threshold was not reached), call handleTap() to emulate a
click event.
(WebKit::GestureController::DragGesture::DragGesture): Initialize
the GtkGestureDrag.
(WebKit::GestureController::ZoomGesture::begin): Save the current
page scale factor and the center point of the gesture.
(WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
page scale change in an idle for the given scale value.
(WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
the GtkGestureZoom.
* UIProcess/gtk/GestureController.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove the factory method from DragAndDropHandler
https://bugs.webkit.org/show_bug.cgi?id=137872

Reviewed by Sergio Villar Senin.

Make the constructor public and use std::make_unique instead.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragAndDropHandler):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::create): Deleted.
* UIProcess/gtk/DragAndDropHandler.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Improve zooming gesture positioning
https://bugs.webkit.org/show_bug.cgi?id=137822

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-10-20
Reviewed by Carlos Garcia Campos.

* UIProcess/WebPageProxy.h:
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::ZoomGesture::center):
(WebKit::GestureController::ZoomGesture::begin):
(WebKit::GestureController::ZoomGesture::handleZoom):
(WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
the proper view coordinates for the current offset/scale, based
on the initial gesture center point in document coordinates, and
the current center/scale.
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
call to retrieve the zoom gesture anchor point, in document coordinates.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added stub.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
translated coordinates used as the anchor point of the zoom gesture.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[cmake] Remove duplicated source files
https://bugs.webkit.org/show_bug.cgi?id=137875

Reviewed by Gyuyoung Kim.

* CMakeLists.txt:


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