Remove files only used by the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=127219
<rdar://problem/13331277>

Reviewed by Andreas Kling.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/AtomicHTMLToken.h:
* html/parser/BackgroundHTMLInputStream.cpp: Removed.
* html/parser/BackgroundHTMLInputStream.h: Removed.
* html/parser/BackgroundHTMLParser.cpp: Removed.
* html/parser/BackgroundHTMLParser.h: Removed.
* html/parser/CompactHTMLToken.cpp: Removed.
* html/parser/CompactHTMLToken.h: Removed.
* html/parser/HTMLDocumentParser.cpp:
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLIdentifier.cpp: Removed.
* html/parser/HTMLIdentifier.h: Removed.
* html/parser/HTMLParserIdioms.h:
* html/parser/HTMLPreloadScanner.h:
* html/parser/HTMLTreeBuilderSimulator.cpp: Removed.
* html/parser/HTMLTreeBuilderSimulator.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GC soon after responding to fake memory pressure.
<https://webkit.org/b/127210>

Ask JSC to garbage collect "soon" after handling the fake memory
pressure signal on Mac. This seems to stabilize the post-pressure
numbers on Membuster3 a bit on my laptop. The difference is mostly
made up of JSC::CodeBlock objects.

Reviewed by Geoffrey Garen.

* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::install):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove HTMLParserThread
https://bugs.webkit.org/show_bug.cgi?id=127220

Reviewed by Andreas Kling.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/HTMLDocumentParser.cpp:
* html/parser/HTMLParserThread.cpp: Removed.
* html/parser/HTMLParserThread.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove DocumentParser::pinToMainThread() and related code
https://bugs.webkit.org/show_bug.cgi?id=127221

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::setContent):
* dom/DocumentParser.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/HTMLParserOptions.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Nix files from WebCore
https://bugs.webkit.org/show_bug.cgi?id=127176

Patch by Lauro Neto <lauro.neto@openbossa.org> on 2014-01-18
Reviewed by Anders Carlsson.

.:

* Source/cmake/OptionsNix.cmake: Removed.

Source/WebCore:

* PlatformNix.cmake: Removed.
* css/mediaControlsNix.css: Removed.
* css/mediaControlsNixFullscreen.css: Removed.
* editing/nix/EditorNix.cpp: Removed.
* page/nix/EventHandlerNix.cpp: Removed.
* platform/audio/nix/AudioBusNix.cpp: Removed.
* platform/audio/nix/AudioDestinationNix.cpp: Removed.
* platform/audio/nix/AudioDestinationNix.h: Removed.
* platform/audio/nix/FFTFrameNix.cpp: Removed.
* platform/graphics/nix/IconNix.cpp: Removed.
* platform/graphics/nix/ImageNix.cpp: Removed.
* platform/nix/CursorNix.cpp: Removed.
* platform/nix/DragDataNix.cpp: Removed.
* platform/nix/DragImageNix.cpp: Removed.
* platform/nix/ErrorsNix.cpp: Removed.
* platform/nix/ErrorsNix.h: Removed.
* platform/nix/FileSystemNix.cpp: Removed.
* platform/nix/GamepadsNix.cpp: Removed.
* platform/nix/LanguageNix.cpp: Removed.
* platform/nix/LocalizedStringsNix.cpp: Removed.
* platform/nix/MIMETypeRegistryNix.cpp: Removed.
* platform/nix/NixKeyboardUtilities.cpp: Removed.
* platform/nix/NixKeyboardUtilities.h: Removed.
* platform/nix/PasteboardNix.cpp: Removed.
* platform/nix/PlatformKeyboardEventNix.cpp: Removed.
* platform/nix/PlatformScreenNix.cpp: Removed.
* platform/nix/RenderThemeNix.cpp: Removed.
* platform/nix/RenderThemeNix.h: Removed.
* platform/nix/ScrollbarThemeNix.cpp: Removed.
* platform/nix/ScrollbarThemeNix.h: Removed.
* platform/nix/SharedTimerNix.cpp: Removed.
* platform/nix/SoundNix.cpp: Removed.
* platform/nix/TemporaryLinkStubs.cpp: Removed.
* platform/nix/WidgetNix.cpp: Removed.
* platform/nix/support/MultiChannelPCMData.cpp: Removed.
* platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()..
https://bugs.webkit.org/show_bug.cgi?id=127127.

Reviewed by Geoffrey Garen.

In order to implement bytecode level breakpoints, we need a mechanism
for computing the best fit op_debug bytecode offset for any valid given
line and column value in the source. The "best fit" op_debug bytecode
in this case is defined below in the comment for
UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn().

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::opDebugBytecodeOffsetForLineAndColumn):
- Convert the line and column to unlinked line and column values and
  pass them to UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()
  to do the real work.

* bytecode/CodeBlock.h:
* bytecode/LineColumnInfo.h: Added.
(JSC::LineColumnInfo::operator <):
(JSC::LineColumnInfo::LineColumnPair::LineColumnPair):
(JSC::LineColumnInfo::operator ==):
(JSC::LineColumnInfo::operator !=):
(JSC::LineColumnInfo::operator <=):
(JSC::LineColumnInfo::operator >):
(JSC::LineColumnInfo::operator >=):
* bytecode/LineInfo.h: Removed.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::decodeExpressionRangeLineAndColumn):
- Factored this out of expressionRangeForBytecodeOffset() so that it can
  be called from multiple places.
(JSC::dumpLineColumnEntry):
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
(JSC::UnlinkedCodeBlock::dumpOpDebugLineColumnInfoList):
- Some dumpers for debugging use only.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
(JSC::UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn):
- Finds the earliest op_debug bytecode whose line and column matches the
  specified line and column values. If an exact match is not found, then
  finds the nearest op_debug bytecode that precedes the specified line
  and column values. If there are more than one op_debug at that preceding
  line and column value, then the earliest of those op_debug bytecodes will
  be be selected. The offset of the selected bytecode will be returned.

  We want the earliest one because when we have multiple op_debug bytecodes
  that map to a given line and column, a debugger user would expect to break
  on the first one and step through the rest thereafter if needed.

(JSC::compareLineColumnInfo):
(JSC::UnlinkedCodeBlock::opDebugLineColumnInfoList):
- Creates the sorted opDebugLineColumnInfoList on demand. This list is
  stored in the UnlinkedCodeBlock's rareData.
* bytecode/UnlinkedCodeBlock.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove threaded parser code from the preload scanners
https://bugs.webkit.org/show_bug.cgi?id=127222

Reviewed by Andreas Kling.

* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::CSSPreloadScanner):
Use nullptr.

(WebCore::CSSPreloadScanner::scan):
Move scanCommon here and simplify the code.

* html/parser/CSSPreloadScanner.h:
Remove scanCommon.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::tagIdFor):
TagId is a strong enum now, update enum values.

(WebCore::TokenPreloadScanner::initiatorFor):
Ditto.

(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
Ditto.

(WebCore::TokenPreloadScanner::StartTagScanner::match):
Indent this.

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
TagId is a strong enum now, update enum values.

(WebCore::TokenPreloadScanner::StartTagScanner::charset):
Ditto.

(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
Ditto.

(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
Ditto.

(WebCore::TokenPreloadScanner::scan):
Merge scan and scanCommon.

* html/parser/HTMLPreloadScanner.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the remaining threaded parser code
https://bugs.webkit.org/show_bug.cgi?id=127224

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::decrementActiveParserCount):
* html/parser/AtomicHTMLToken.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
(WebCore::HTMLDocumentParser::detach):
(WebCore::HTMLDocumentParser::stopParsing):
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::end):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::textPosition):
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/HTMLParserIdioms.h:
* html/parser/HTMLTokenizer.cpp:
* html/parser/HTMLTokenizer.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoading):
(WebCore::DocumentLoader::checkLoadComplete):
* page/Settings.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WKRenderingProgressEvents a shareable API.
https://bugs.webkit.org/show_bug.cgi?id=127213

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-18
Reviewed by Dan Bernstein.

Move WKRenderingProgressEvents from UIProcess to Shared, so that an inject bundle
could also use this enum when listening to layout milestones.

* Shared/API/Cocoa/WKRenderingProgressEvents.h: Added.
(NS_OPTIONS):
* Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Added.
(renderingProgressEvents):
* UIProcess/API/Cocoa/WKBrowsingContextController.h: Move WKRenderingProgressEvents to Shared/API/Cocoa/WKRenderingProgressEvents.h.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Move renderingProgressEvents() to WKRenderingProgressEventsInternal.h.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add
    webProcessPlugInBrowserContextController:renderingProgressDidChange: to load delegate.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didLayout):
(setUpPageLoaderClient): Also listen to didLayout callback for layout milestones.

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