Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 118cb41971 | |||
| 3d9f2007ee | |||
| e79f96e217 | |||
| 3333274cfb | |||
| 26ee9e683f | |||
| 9e45ac5fa1 | |||
| 612173dfbb | |||
| 89876e8809 | |||
| 09e06b5769 | |||
| 1b9149be2b | |||
| b945c13fa8 | |||
| 6948426302 | |||
| 7d73afdd42 | |||
| 85cf588032 | |||
| e315cabfbd | |||
| 00bbb363a7 | |||
| c7632b5a59 | |||
| ac72498284 | |||
| e0e20243d5 | |||
| de9a1fde8a | |||
| be3867a6e3 | |||
| 3760c76d74 | |||
| 834cda2d86 | |||
| 9467bc2474 | |||
| bb7c5d4c02 | |||
| 169e013ad2 | |||
| 3629b02097 | |||
| b3b9ab7f93 | |||
| fa0201f2fc | |||
| 9d0977d0dd | |||
| 0a8e3a0e3b | |||
| 3a294796d8 | |||
| a1ca351912 | |||
| 153d48c19c | |||
| 1dda2921fe | |||
| 23f4e40d08 | |||
| f4f7f48845 | |||
| 98f7c8304f | |||
| 12276e91b3 | |||
| ad2790b653 | |||
| 70eeecbf67 | |||
| 228e3ea2a7 | |||
| 918c59e5ff | |||
| 2a641ddacd | |||
| 91d1f85c1b | |||
| 85bd39963f | |||
| 7cbfdb9c78 | |||
| d756fc4298 | |||
| 0fe6b7c42d | |||
| 7c2335184e | |||
| 0c6084ba73 | |||
| 5201860073 | |||
| cf21b88eb1 | |||
| 7617fceff1 | |||
| 9dd3c70fc3 | |||
| fe2a441171 | |||
| 7c32b5f219 | |||
| bf0d8560b0 | |||
| ebc6f7a097 | |||
| d29a70dfec | |||
| b8f56ca97d | |||
| 0f954d5d56 | |||
| ac5089d69b | |||
| c9c36397e0 | |||
| 923e271429 | |||
| 8546168324 | |||
| da765169fa | |||
| ec6d03ee57 | |||
| 7944549bd7 | |||
| bb6a97984b | |||
| 0aff9cf787 | |||
| b7bf9d2b04 | |||
| 12af838fa2 | |||
| 14b8b5390f | |||
| a5599c4163 | |||
| c0ac25645d | |||
| fa431550d7 | |||
| 70c6aee814 | |||
| 7309b97b92 | |||
| 7ffb8e5ca0 | |||
| 682b19c242 | |||
| 16ed846e65 | |||
| 820b3ef091 | |||
| fb7ea25b1f | |||
| 5302c16600 | |||
| 2dfdeb22ca | |||
| 135715b606 | |||
| f8e6a39171 | |||
| 84960e71ee | |||
| 7b028a2819 | |||
| 5aa77eac9b |
@@ -0,0 +1,30 @@
|
||||
name: HTMLKit CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
macOS:
|
||||
name: Test macOS
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: macOS
|
||||
run: xcodebuild -workspace "HTMLKit.xcworkspace" -scheme "HTMLKit-macOS" -destination "platform=macOS" -enableCodeCoverage YES clean test | xcpretty
|
||||
- name: code coverage
|
||||
uses: codecov/codecov-action@v1
|
||||
iOS:
|
||||
name: Test iOS
|
||||
runs-on: macOS-latest
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_11.5.app/Contents/Developer
|
||||
strategy:
|
||||
matrix:
|
||||
destination: ["OS=13.5,name=iPhone 11 Pro", "OS=12.4,name=iPhone XS", "OS=11.4,name=iPhone X"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: iOS - ${{ matrix.destination }}
|
||||
run: xcodebuild -workspace "HTMLKit.xcworkspace" -scheme "HTMLKit-iOS" -destination "${{ matrix.destination }}" clean test | xcpretty
|
||||
+4
-1
@@ -1,5 +1,5 @@
|
||||
module: HTMLKit
|
||||
module_version: 2.1.1
|
||||
module_version: 4.2.0
|
||||
author: Iskandar Abudiab
|
||||
author_url: https://twitter.com/iabudiab
|
||||
github_url: https://github.com/iabudiab/HTMLKit
|
||||
@@ -33,6 +33,7 @@ custom_categories:
|
||||
- HTMLTemplate
|
||||
- HTMLDOMTokenList
|
||||
- HTMLRange
|
||||
- HTMLSerializer
|
||||
|
||||
- name: Iteration & Filtering
|
||||
children:
|
||||
@@ -41,7 +42,9 @@ custom_categories:
|
||||
- HTMLNodeFilterShowOptions
|
||||
- HTMLNodeFilterValue
|
||||
- HTMLNodeFilterBlock
|
||||
- HTMLNodeVisitor
|
||||
- HTMLSelectorNodeFilter
|
||||
- HTMLTreeVisitor
|
||||
- HTMLTreeWalker
|
||||
|
||||
- name: Structures
|
||||
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
language: objective-c
|
||||
osx_image: xcode9
|
||||
|
||||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
install:
|
||||
- gem install xcpretty
|
||||
|
||||
env:
|
||||
global:
|
||||
- LC_CTYPE=en_US.UTF-8
|
||||
- LANG=en_US.UTF-8
|
||||
- WORKSPACE=HTMLKit.xcworkspace
|
||||
- IOS_FRAMEWORK_SCHEME=HTMLKit-iOS
|
||||
- MACOS_FRAMEWORK_SCHEME=HTMLKit-macOS
|
||||
- WATCHOS_FRAMEWORK_SCHEME="HTMLKit-watchOS"
|
||||
- TVOS_FRAMEWORK_SCHEME="HTMLKit-tvOS"
|
||||
- IOS_SDK=iphonesimulator11.0
|
||||
- MACOS_SDK=macosx10.13
|
||||
- WATCHOS_SDK=watchsimulator4.0
|
||||
- TVOS_SDK=appletvsimulator11.0
|
||||
matrix:
|
||||
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK"
|
||||
- DESTINATION="OS=9.3,name=iPhone 6s Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK"
|
||||
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK"
|
||||
- DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK"
|
||||
- DESTINATION="OS=3.2,name=Apple Watch Series 2 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK"
|
||||
- DESTINATION="OS=4.0,name=Apple Watch Series 3 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK"
|
||||
- DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK"
|
||||
- DESTINATION="OS=11.0,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK"
|
||||
|
||||
script:
|
||||
- set -o pipefail
|
||||
- xcodebuild -version
|
||||
- xcodebuild -showsdks
|
||||
- travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO clean build | xcpretty -c
|
||||
- if [ "$SDK" != "$WATCHOS_SDK" ]; then
|
||||
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES test | xcpretty -c;
|
||||
fi
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
@@ -1,5 +1,88 @@
|
||||
# Change Log
|
||||
|
||||
## [4.2.0](https://github.com/iabudiab/HTMLKit/releases/tag/4.1.0)
|
||||
|
||||
- Fix test compilation under Xcode 12.5 (issue #43)
|
||||
- Updated HTML5Lib-Tests submodule (082a4be)
|
||||
- Updated parser and tokenizer for latest spec changes to pass test suite
|
||||
|
||||
## [4.1.0](https://github.com/iabudiab/HTMLKit/releases/tag/4.1.0)
|
||||
|
||||
- Updated project for Xcode 12.5
|
||||
|
||||
## [4.0.0](https://github.com/iabudiab/HTMLKit/releases/tag/4.0.0)
|
||||
|
||||
Release on 2020.07.16
|
||||
|
||||
### Breaking Change
|
||||
|
||||
- Swift package version updated to 5.1
|
||||
|
||||
|
||||
## [3.1.0](https://github.com/iabudiab/HTMLKit/releases/tag/3.1.0)
|
||||
|
||||
Release on 2019.08.20
|
||||
|
||||
### Added
|
||||
|
||||
- `HTMLTreeVisitor` that walks the DOM in tree order
|
||||
- New HTML serialization implementation based on visitor pattern
|
||||
|
||||
### Fixes
|
||||
|
||||
- HTML serialization for deeply nested DOM trees (issue #33)
|
||||
- Occasional Internal Consistency exceptions when deallocating node iterator (issue #36)
|
||||
|
||||
|
||||
## [3.0.0](https://github.com/iabudiab/HTMLKit/releases/tag/3.0.0)
|
||||
|
||||
Released on 2019.03.28
|
||||
|
||||
### Breaking Change
|
||||
|
||||
- Introduce prefix for `NSString` and `NSCharacterSet` categories to prevent collision with existing code (issue #35)
|
||||
|
||||
|
||||
## [2.1.5](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.5)
|
||||
|
||||
Released on 2018.07.16
|
||||
|
||||
### Fixes
|
||||
|
||||
- Parser would handle foreign attributes incorrectly (issue #30)
|
||||
|
||||
|
||||
## [2.1.4](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.4)
|
||||
|
||||
Released on 2018.05.01
|
||||
|
||||
### Fixes
|
||||
|
||||
- `gt(n)`, `lt(n)` and `eq(n)` selectors would select wrong elements for the zero-index (issue #25)
|
||||
|
||||
|
||||
## [2.1.3](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.3)
|
||||
|
||||
Released on 2018.03.21
|
||||
|
||||
### Fixes
|
||||
|
||||
- `HTMLElement` clone would return an immutable dictionary for attributes (issue #20)
|
||||
- Fixed by @CRivlaldo in PR #24
|
||||
- `HTMLNodeFilterBlock` would behave differently on simulator and device (issue #22)
|
||||
- Fixed by @CRivlaldo in PR #23
|
||||
|
||||
|
||||
## [2.1.2](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.2)
|
||||
|
||||
Released on 2017.11.6
|
||||
|
||||
### Fixes
|
||||
|
||||
- `HTMLText` serialization (issue #16)
|
||||
- `HTMLElement` attribute value serialization (issue #17)
|
||||
|
||||
|
||||
## [2.1.1](https://github.com/iabudiab/HTMLKit/releases/tag/2.1.1)
|
||||
|
||||
Released on 2017.10.13
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 1250;
|
||||
ORGANIZATIONNAME = iabudiab;
|
||||
TargetAttributes = {
|
||||
629A63C81D9AFE0E0089679F = {
|
||||
@@ -100,10 +100,11 @@
|
||||
};
|
||||
buildConfigurationList = 629A63C41D9AFE0E0089679F /* Build configuration list for PBXProject "HTMLKitExample" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 629A63C01D9AFE0E0089679F;
|
||||
productRefGroup = 629A63CA1D9AFE0E0089679F /* Products */;
|
||||
@@ -131,6 +132,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@@ -140,6 +142,7 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
@@ -147,8 +150,10 @@
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -186,6 +191,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@@ -195,6 +201,7 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
@@ -202,8 +209,10 @@
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -233,16 +242,18 @@
|
||||
629A63D11D9AFE0E0089679F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
629A63D21D9AFE0E0089679F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
+3
-9
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1250"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,10 +26,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -39,14 +36,13 @@
|
||||
ReferencedContainer = "container:HTMLKitExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -63,8 +59,6 @@
|
||||
ReferencedContainer = "container:HTMLKitExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -112,7 +112,7 @@ do {
|
||||
try scraper.load()
|
||||
|
||||
// Parse the selector
|
||||
let repositoryContent = try CSSSelectorParser.parseSelector("[role='main'] .repository-content > .file-wrap > .files tr.js-navigation-item")
|
||||
let repositoryContent = try CSSSelectorParser.parseSelector(".repository-content > .file-wrap > table.files tr.js-navigation-item")
|
||||
|
||||
// Query matching elements
|
||||
let files = try scraper.listElements(matching: repositoryContent)
|
||||
@@ -131,13 +131,10 @@ do {
|
||||
// The following selector: "[role='main'] div.file table.js-file-line-container td:nth-child(2)"
|
||||
// can be defined in type-safe manner:
|
||||
let selector = allOf([
|
||||
descendantOfElementSelector(
|
||||
attributeSelector(.exactMatch, "role", "main")
|
||||
),
|
||||
descendantOfElementSelector(
|
||||
allOf([
|
||||
typeSelector("div"),
|
||||
classSelector("file")
|
||||
classSelector("repository-content")
|
||||
])
|
||||
),
|
||||
descendantOfElementSelector(
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "HTMLKit"
|
||||
s.version = "2.1.1"
|
||||
s.version = "4.2.0"
|
||||
s.summary = "HTMLKit, an Objective-C framework for your everyday HTML needs."
|
||||
s.license = "MIT"
|
||||
s.homepage = "https://github.com/iabudiab/HTMLKit"
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
62056C501E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
62056C511E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
62056C521E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
620AB7B12087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
620AB7B22087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
620AB7B32087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */; };
|
||||
62132E5A1C01F83200084175 /* CSSSelectorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 62132E581C01F83200084175 /* CSSSelectorTest.m */; };
|
||||
62132E5D1C021FF200084175 /* css-tests in Resources */ = {isa = PBXBuildFile; fileRef = 62132E5B1C021FF200084175 /* css-tests */; };
|
||||
6216ACFD1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6216ACFC1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m */; };
|
||||
@@ -55,6 +58,18 @@
|
||||
625A14B019C7829400AD0C32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 625A14AF19C7829400AD0C32 /* Cocoa.framework */; };
|
||||
625A14C519C7829400AD0C32 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 625A14C419C7829400AD0C32 /* XCTest.framework */; };
|
||||
625A14C919C7829400AD0C32 /* HTMLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 625A14AC19C7829400AD0C32 /* HTMLKit.framework */; };
|
||||
625A67C9224AC62C00C6D57D /* NSString+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A67C7224AC62C00C6D57D /* NSString+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625A67CA224AC62C00C6D57D /* NSString+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A67C7224AC62C00C6D57D /* NSString+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625A67CB224AC62C00C6D57D /* NSString+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A67C7224AC62C00C6D57D /* NSString+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625A67CC224AC62C00C6D57D /* NSString+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625A67C7224AC62C00C6D57D /* NSString+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625A67CD224AC62C00C6D57D /* NSString+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67C8224AC62C00C6D57D /* NSString+Private.m */; };
|
||||
625A67CE224AC62C00C6D57D /* NSString+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67C8224AC62C00C6D57D /* NSString+Private.m */; };
|
||||
625A67CF224AC62C00C6D57D /* NSString+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67C8224AC62C00C6D57D /* NSString+Private.m */; };
|
||||
625A67D0224AC62C00C6D57D /* NSString+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67C8224AC62C00C6D57D /* NSString+Private.m */; };
|
||||
625A67D2224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */; };
|
||||
625A67D3224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */; };
|
||||
625A67D4224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */; };
|
||||
625A67D5224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */; };
|
||||
625D0F031C2717DE00D7BEB0 /* HTMLNode+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625D0F011C2717DE00D7BEB0 /* HTMLNode+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625D0F041C2717DE00D7BEB0 /* HTMLNode+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 625D0F011C2717DE00D7BEB0 /* HTMLNode+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
625EE4571CBAA41D00F2CC8E /* HTMLKitTestObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 625EE4561CBAA41D00F2CC8E /* HTMLKitTestObserver.m */; };
|
||||
@@ -306,6 +321,31 @@
|
||||
62857D8F1D39A47F008DC254 /* CSSCombinatorSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 62FA04E11BCC360D009ABF98 /* CSSCombinatorSelector.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62857D901D39A47F008DC254 /* CSSCompoundSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 620C87791BD44CBE00FB3EEE /* CSSCompoundSelector.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
628AF6301BC99A6C00496128 /* CSSNthExpressionsParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 628AF62E1BC99A6C00496128 /* CSSNthExpressionsParserTests.m */; };
|
||||
6295FB0722F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB0822F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB0922F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB0A22F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB0B22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */; };
|
||||
6295FB0C22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */; };
|
||||
6295FB0D22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */; };
|
||||
6295FB0E22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */; };
|
||||
6295FB1122F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB1222F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB1322F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB1422F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
6295FB1522F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */; };
|
||||
6295FB1622F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */; };
|
||||
6295FB1722F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */; };
|
||||
6295FB1822F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */; };
|
||||
6295FB1A22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1922F0F309005C6DE8 /* HTMLTreeVisitorTests.m */; };
|
||||
6295FB1B22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1922F0F309005C6DE8 /* HTMLTreeVisitorTests.m */; };
|
||||
6295FB1C22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6295FB1922F0F309005C6DE8 /* HTMLTreeVisitorTests.m */; };
|
||||
62A95A4D1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62A95A4E1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62A95A4F1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */; };
|
||||
62C82E0D20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62C82E0C20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m */; };
|
||||
62C82E0E20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62C82E0C20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m */; };
|
||||
62C82E0F20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62C82E0C20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m */; };
|
||||
62D8345A19FB1AC4009205A9 /* HTML5LibTokenizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 62D8345819FB1AC4009205A9 /* HTML5LibTokenizerTest.m */; };
|
||||
62D91C231DE218A500BEFADE /* HTMLRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 62D91C211DE218A500BEFADE /* HTMLRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62D91C241DE218A500BEFADE /* HTMLRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 62D91C211DE218A500BEFADE /* HTMLRange.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -315,6 +355,14 @@
|
||||
62D91C281DE218A500BEFADE /* HTMLRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 62D91C221DE218A500BEFADE /* HTMLRange.m */; };
|
||||
62D91C291DE218A500BEFADE /* HTMLRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 62D91C221DE218A500BEFADE /* HTMLRange.m */; };
|
||||
62D91C2A1DE218A500BEFADE /* HTMLRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 62D91C221DE218A500BEFADE /* HTMLRange.m */; };
|
||||
62E0917F22EDEB9D00C61073 /* HTMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62E0918022EDEB9D00C61073 /* HTMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62E0918122EDEB9D00C61073 /* HTMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62E0918222EDEB9D00C61073 /* HTMLSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
62E0918322EDEB9D00C61073 /* HTMLSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */; };
|
||||
62E0918422EDEB9D00C61073 /* HTMLSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */; };
|
||||
62E0918522EDEB9D00C61073 /* HTMLSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */; };
|
||||
62E0918622EDEB9D00C61073 /* HTMLSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */; };
|
||||
62E0BA971E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */; };
|
||||
62E0BA981E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */; };
|
||||
62E0BA991E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */; };
|
||||
@@ -581,6 +629,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
62056C4E1E2AD9FB009A4EE0 /* HTMLNodeIterator+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "HTMLNodeIterator+Private.h"; path = "include/HTMLNodeIterator+Private.h"; sourceTree = "<group>"; };
|
||||
62079BE71AF56F1E00D3B402 /* CSSSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSSelector.h; path = include/CSSSelector.h; sourceTree = "<group>"; };
|
||||
620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CSSStructuralPseudoSelectors.m; path = HTMLKitTests/CSSStructuralPseudoSelectors.m; sourceTree = "<group>"; };
|
||||
620C87791BD44CBE00FB3EEE /* CSSCompoundSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSCompoundSelector.h; path = include/CSSCompoundSelector.h; sourceTree = "<group>"; };
|
||||
620C877A1BD44CBE00FB3EEE /* CSSCompoundSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSCompoundSelector.m; sourceTree = "<group>"; };
|
||||
620EE9471BC46F2A0028ED34 /* CSSPseudoClassSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSPseudoClassSelector.h; path = include/CSSPseudoClassSelector.h; sourceTree = "<group>"; };
|
||||
@@ -682,6 +731,9 @@
|
||||
625A14DF19C7834100AD0C32 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
625A150619C78ABA00AD0C32 /* HTMLInputStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLInputStreamReader.h; path = include/HTMLInputStreamReader.h; sourceTree = "<group>"; };
|
||||
625A150719C78ABA00AD0C32 /* HTMLInputStreamReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLInputStreamReader.m; sourceTree = "<group>"; };
|
||||
625A67C7224AC62C00C6D57D /* NSString+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "NSString+Private.h"; path = "include/NSString+Private.h"; sourceTree = "<group>"; };
|
||||
625A67C8224AC62C00C6D57D /* NSString+Private.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Private.m"; sourceTree = "<group>"; };
|
||||
625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLQuircksMode.m; sourceTree = "<group>"; };
|
||||
625D0F011C2717DE00D7BEB0 /* HTMLNode+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "HTMLNode+Private.h"; path = "include/HTMLNode+Private.h"; sourceTree = "<group>"; };
|
||||
625EE4551CBAA41D00F2CC8E /* HTMLKitTestObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLKitTestObserver.h; path = HTMLKitTests/HTMLKitTestObserver.h; sourceTree = "<group>"; };
|
||||
625EE4561CBAA41D00F2CC8E /* HTMLKitTestObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLKitTestObserver.m; path = HTMLKitTests/HTMLKitTestObserver.m; sourceTree = "<group>"; };
|
||||
@@ -703,6 +755,12 @@
|
||||
628AF63C1BC9D6FB00496128 /* CSSStructuralPseudoSelectors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSStructuralPseudoSelectors.h; path = include/CSSStructuralPseudoSelectors.h; sourceTree = "<group>"; };
|
||||
628AF63D1BC9D6FB00496128 /* CSSStructuralPseudoSelectors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSStructuralPseudoSelectors.m; sourceTree = "<group>"; };
|
||||
628B7CE61A080E1000602C87 /* HTMLNamespaces.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLNamespaces.h; path = include/HTMLNamespaces.h; sourceTree = "<group>"; };
|
||||
6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLNodeVisitor.h; path = include/HTMLNodeVisitor.h; sourceTree = "<group>"; };
|
||||
6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLNodeVisitor.m; sourceTree = "<group>"; };
|
||||
6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLTreeVisitor.h; path = include/HTMLTreeVisitor.h; sourceTree = "<group>"; };
|
||||
6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLTreeVisitor.m; sourceTree = "<group>"; };
|
||||
6295FB1922F0F309005C6DE8 /* HTMLTreeVisitorTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = HTMLTreeVisitorTests.m; path = HTMLKitTests/HTMLTreeVisitorTests.m; sourceTree = "<group>"; };
|
||||
62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = HTMLSerializationTests.m; path = HTMLKitTests/HTMLSerializationTests.m; sourceTree = "<group>"; };
|
||||
62ACB8DB1BC5C13E00E283C1 /* CSSPseudoFunctionSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSPseudoFunctionSelector.h; path = include/CSSPseudoFunctionSelector.h; sourceTree = "<group>"; };
|
||||
62ACB8DC1BC5C13E00E283C1 /* CSSPseudoFunctionSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSPseudoFunctionSelector.m; sourceTree = "<group>"; };
|
||||
62AE593319F97D880043F069 /* HTMLParseErrorToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParseErrorToken.h; path = include/HTMLParseErrorToken.h; sourceTree = "<group>"; };
|
||||
@@ -715,10 +773,13 @@
|
||||
62AE594319F992F30043F069 /* HTMLCommentToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLCommentToken.m; sourceTree = "<group>"; };
|
||||
62AE594719F9948A0043F069 /* HTMLCharacterToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLCharacterToken.h; path = include/HTMLCharacterToken.h; sourceTree = "<group>"; };
|
||||
62AE594819F9948A0043F069 /* HTMLCharacterToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLCharacterToken.m; sourceTree = "<group>"; };
|
||||
62C82E0C20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = HTMLKitParserIssuesTests.m; path = HTMLKitTests/HTMLKitParserIssuesTests.m; sourceTree = "<group>"; };
|
||||
62D8345719FB1AC4009205A9 /* HTML5LibTokenizerTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTML5LibTokenizerTest.h; path = HTMLKitTests/HTML5LibTokenizerTest.h; sourceTree = "<group>"; };
|
||||
62D8345819FB1AC4009205A9 /* HTML5LibTokenizerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTML5LibTokenizerTest.m; path = HTMLKitTests/HTML5LibTokenizerTest.m; sourceTree = "<group>"; };
|
||||
62D91C211DE218A500BEFADE /* HTMLRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLRange.h; path = include/HTMLRange.h; sourceTree = "<group>"; };
|
||||
62D91C221DE218A500BEFADE /* HTMLRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLRange.m; sourceTree = "<group>"; };
|
||||
62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLSerializer.h; path = include/HTMLSerializer.h; sourceTree = "<group>"; };
|
||||
62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLSerializer.m; sourceTree = "<group>"; };
|
||||
62E0BA961E25456700E4D193 /* HTMLCharacterDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLCharacterDataTests.m; path = HTMLKitTests/HTMLCharacterDataTests.m; sourceTree = "<group>"; };
|
||||
62E1A3B41E610E5300C41C3B /* Fixtures */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Fixtures; sourceTree = "<group>"; };
|
||||
62E7CAAE19CDFFB500465A83 /* HTMLTokenizerCharacters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HTMLTokenizerCharacters.h; path = include/HTMLTokenizerCharacters.h; sourceTree = "<group>"; };
|
||||
@@ -848,18 +909,23 @@
|
||||
623406E01ADB04F9004677A3 /* HTMLTemplate.m */,
|
||||
62567F4E1C0CB5750025D458 /* HTMLDOMTokenList.h */,
|
||||
62567F4F1C0CB5750025D458 /* HTMLDOMTokenList.m */,
|
||||
6247A9411B152F4F00CCF25C /* HTMLNodeIterator.h */,
|
||||
6247A9421B152F4F00CCF25C /* HTMLNodeIterator.m */,
|
||||
624717BA1B22009200B38302 /* HTMLTreeWalker.h */,
|
||||
624717BB1B22009200B38302 /* HTMLTreeWalker.m */,
|
||||
6247A9461B152F8C00CCF25C /* HTMLNodeFilter.h */,
|
||||
624717B71B21FE5400B38302 /* HTMLNodeFilter.m */,
|
||||
6247A9411B152F4F00CCF25C /* HTMLNodeIterator.h */,
|
||||
6247A9421B152F4F00CCF25C /* HTMLNodeIterator.m */,
|
||||
6295FB0522F0E770005C6DE8 /* HTMLNodeVisitor.h */,
|
||||
6295FB0622F0E770005C6DE8 /* HTMLNodeVisitor.m */,
|
||||
6295FB0F22F0ECEE005C6DE8 /* HTMLTreeVisitor.h */,
|
||||
6295FB1022F0ECEE005C6DE8 /* HTMLTreeVisitor.m */,
|
||||
624717BA1B22009200B38302 /* HTMLTreeWalker.h */,
|
||||
624717BB1B22009200B38302 /* HTMLTreeWalker.m */,
|
||||
62D91C211DE218A500BEFADE /* HTMLRange.h */,
|
||||
62D91C221DE218A500BEFADE /* HTMLRange.m */,
|
||||
6238C9831AB8D6330006512E /* HTMLKitDOMExceptions.h */,
|
||||
6238C9841AB8D6330006512E /* HTMLKitDOMExceptions.m */,
|
||||
628B7CE61A080E1000602C87 /* HTMLNamespaces.h */,
|
||||
623719431AA12EE8002E03C8 /* HTMLQuirksMode.h */,
|
||||
625A67D1224ADC7700C6D57D /* HTMLQuircksMode.m */,
|
||||
625D0F071C2717E400D7BEB0 /* Private */,
|
||||
);
|
||||
name = DOM;
|
||||
@@ -880,6 +946,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
623916C61AC7209E0066B4FE /* HTMLNodeIteratorTests.m */,
|
||||
6295FB1922F0F309005C6DE8 /* HTMLTreeVisitorTests.m */,
|
||||
6247171B1B2240B800C11912 /* HTMLTreeWalkerTests.m */,
|
||||
624FC3791AE591D80015DDF9 /* HTMLNodesTests.m */,
|
||||
62EC7AE51AEEAC6F0015D3BE /* HTMLMutationAlgorithmsTests.m */,
|
||||
@@ -959,6 +1026,7 @@
|
||||
62AE593219F97CCA0043F069 /* Tokenizing */,
|
||||
628E16EC1ADAE71700B15A06 /* Parsing */,
|
||||
623719441AA1472B002E03C8 /* DOM */,
|
||||
62E0917C22EDEB8700C61073 /* Serializing */,
|
||||
628E16ED1ADAE73700B15A06 /* Categories */,
|
||||
628E16EE1ADAE75300B15A06 /* Structures */,
|
||||
62079BE61AF5656600D3B402 /* CSS */,
|
||||
@@ -984,6 +1052,8 @@
|
||||
625EE45A1CBB171300F2CC8E /* HTMLKitTestUtil.m */,
|
||||
6236738C1AC0CD2400FF89B3 /* Tokenizer */,
|
||||
623975581AC362A5007E26F1 /* Tree Construction */,
|
||||
62C82E0B20FD2FCB008497A8 /* Parser */,
|
||||
629621A222F5A24400F81B5A /* Serialization */,
|
||||
624B9FB71AE072CB00646C4C /* DOM */,
|
||||
624B9FB81AE072D500646C4C /* Categories */,
|
||||
624E1A2D1B1D1C8A00E66AAC /* Structures */,
|
||||
@@ -1041,6 +1111,8 @@
|
||||
628E16ED1ADAE73700B15A06 /* Categories */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
625A67C7224AC62C00C6D57D /* NSString+Private.h */,
|
||||
625A67C8224AC62C00C6D57D /* NSString+Private.m */,
|
||||
6235CE991AA509430026937B /* NSString+HTMLKit.h */,
|
||||
6235CE9A1AA509430026937B /* NSString+HTMLKit.m */,
|
||||
624B28C21B04190D0048D328 /* NSCharacterSet+HTMLKit.h */,
|
||||
@@ -1058,6 +1130,14 @@
|
||||
name = Structures;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
629621A222F5A24400F81B5A /* Serialization */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
62A95A4C1FB0FBFC0009FF26 /* HTMLSerializationTests.m */,
|
||||
);
|
||||
name = Serialization;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62AE593219F97CCA0043F069 /* Tokenizing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1088,6 +1168,23 @@
|
||||
name = Tokenizing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62C82E0B20FD2FCB008497A8 /* Parser */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
62C82E0C20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m */,
|
||||
);
|
||||
name = Parser;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62E0917C22EDEB8700C61073 /* Serializing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
62E0917D22EDEB9D00C61073 /* HTMLSerializer.h */,
|
||||
62E0917E22EDEB9D00C61073 /* HTMLSerializer.m */,
|
||||
);
|
||||
name = Serializing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
62ECBEDF1C0B671000AF847B /* Parsing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1139,6 +1236,7 @@
|
||||
624AB3191B050A4D00F3830D /* CSSAttributeSelectorTests.m */,
|
||||
62F6586F1BD83C8E0045F137 /* CSSNThExpressionSelectorTests.m */,
|
||||
621FBE5C1BDAD90200BC9555 /* CSSCombinatorSelectorTests.m */,
|
||||
620AB7B02087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m */,
|
||||
);
|
||||
name = Selectors;
|
||||
sourceTree = "<group>";
|
||||
@@ -1166,6 +1264,8 @@
|
||||
62ECBEEA1C0B69FD00AF847B /* HTMLCommentToken.h in Headers */,
|
||||
62ECBEEB1C0B69FD00AF847B /* HTMLDOCTYPEToken.h in Headers */,
|
||||
626BE1E21DF3819500C49514 /* HTMLDOMUtils.h in Headers */,
|
||||
6295FB1122F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */,
|
||||
625A67C9224AC62C00C6D57D /* NSString+Private.h in Headers */,
|
||||
62ECBEEC1C0B69FD00AF847B /* HTMLParseErrorToken.h in Headers */,
|
||||
62ECBEED1C0B69FD00AF847B /* HTMLTagToken.h in Headers */,
|
||||
62ECBEEE1C0B69FD00AF847B /* HTMLEOFToken.h in Headers */,
|
||||
@@ -1181,11 +1281,13 @@
|
||||
624C777A1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
62ECBEF51C0B69FD00AF847B /* HTMLMarker.h in Headers */,
|
||||
62ECBEF61C0B69FE00AF847B /* HTMLDOM.h in Headers */,
|
||||
6295FB0722F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */,
|
||||
62ECBEF71C0B69FE00AF847B /* HTMLNode.h in Headers */,
|
||||
621CC4A51DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62ECBEF81C0B69FE00AF847B /* HTMLDocument.h in Headers */,
|
||||
62ECBEF91C0B69FE00AF847B /* HTMLDocumentType.h in Headers */,
|
||||
62ECBEFA1C0B69FE00AF847B /* HTMLDocumentFragment.h in Headers */,
|
||||
62E0917F22EDEB9D00C61073 /* HTMLSerializer.h in Headers */,
|
||||
62ECBEFC1C0B69FE00AF847B /* HTMLComment.h in Headers */,
|
||||
62ECBEFD1C0B69FE00AF847B /* HTMLText.h in Headers */,
|
||||
62ECBEFE1C0B69FE00AF847B /* HTMLTemplate.h in Headers */,
|
||||
@@ -1239,6 +1341,8 @@
|
||||
62857C841D398917008DC254 /* HTMLParser.h in Headers */,
|
||||
62857CDB1D3989CE008DC254 /* CSSAttributeSelector.h in Headers */,
|
||||
62857C791D398907008DC254 /* HTMLEOFToken.h in Headers */,
|
||||
6295FB1422F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */,
|
||||
625A67CC224AC62C00C6D57D /* NSString+Private.h in Headers */,
|
||||
626BE1E51DF3819500C49514 /* HTMLDOMUtils.h in Headers */,
|
||||
62857CC41D3989A9008DC254 /* CSSSelectors.h in Headers */,
|
||||
62857C731D398907008DC254 /* HTMLToken.h in Headers */,
|
||||
@@ -1254,11 +1358,13 @@
|
||||
62857C851D398927008DC254 /* HTMLStackOfOpenElements.h in Headers */,
|
||||
624C777D1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
62857CDF1D3989CE008DC254 /* CSSCombinatorSelector.h in Headers */,
|
||||
6295FB0A22F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */,
|
||||
62857CA91D398973008DC254 /* HTMLNodeIterator.h in Headers */,
|
||||
62857CAE1D398973008DC254 /* HTMLQuirksMode.h in Headers */,
|
||||
621CC4A81DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62857CAF1D398977008DC254 /* HTMLNodeTraversal.h in Headers */,
|
||||
62857C771D398907008DC254 /* HTMLParseErrorToken.h in Headers */,
|
||||
62E0918222EDEB9D00C61073 /* HTMLSerializer.h in Headers */,
|
||||
62857CDC1D3989CE008DC254 /* CSSPseudoClassSelector.h in Headers */,
|
||||
62857CC21D3989A1008DC254 /* HTMLOrderedDictionary.h in Headers */,
|
||||
62857C761D398907008DC254 /* HTMLDOCTYPEToken.h in Headers */,
|
||||
@@ -1312,6 +1418,8 @@
|
||||
62857D4E1D39A40A008DC254 /* HTMLTokenizerCharacters.h in Headers */,
|
||||
62857D4D1D39A40A008DC254 /* HTMLTokenizerStates.h in Headers */,
|
||||
62857D501D39A411008DC254 /* HTMLTokens.h in Headers */,
|
||||
6295FB1322F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */,
|
||||
625A67CB224AC62C00C6D57D /* NSString+Private.h in Headers */,
|
||||
626BE1E41DF3819500C49514 /* HTMLDOMUtils.h in Headers */,
|
||||
62857D7B1D39A452008DC254 /* HTMLNamespaces.h in Headers */,
|
||||
62857D581D39A416008DC254 /* HTMLParser.h in Headers */,
|
||||
@@ -1327,11 +1435,13 @@
|
||||
62857D781D39A44E008DC254 /* HTMLTreeWalker.h in Headers */,
|
||||
624C777C1DE9D05E00DD6DFA /* HTMLCharacterData.h in Headers */,
|
||||
62857D551D39A411008DC254 /* HTMLParseErrorToken.h in Headers */,
|
||||
6295FB0922F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */,
|
||||
62857D541D39A411008DC254 /* HTMLDOCTYPEToken.h in Headers */,
|
||||
62857D871D39A476008DC254 /* CSSInputStream.h in Headers */,
|
||||
621CC4A71DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62857D8F1D39A47F008DC254 /* CSSCombinatorSelector.h in Headers */,
|
||||
62857D5C1D39A41D008DC254 /* HTMLElementAdjustment.h in Headers */,
|
||||
62E0918122EDEB9D00C61073 /* HTMLSerializer.h in Headers */,
|
||||
62857D891D39A47F008DC254 /* CSSSelectorBlock.h in Headers */,
|
||||
62857D6D1D39A44E008DC254 /* HTMLDOM.h in Headers */,
|
||||
62857D751D39A44E008DC254 /* HTMLTemplate.h in Headers */,
|
||||
@@ -1385,6 +1495,8 @@
|
||||
62ECBFAF1C0B6D3B00AF847B /* HTMLNodeIterator.h in Headers */,
|
||||
62ECBFB01C0B6D3C00AF847B /* HTMLTreeWalker.h in Headers */,
|
||||
62ECBFB21C0B6D3C00AF847B /* HTMLNodeFilter.h in Headers */,
|
||||
6295FB1222F0ECEE005C6DE8 /* HTMLTreeVisitor.h in Headers */,
|
||||
625A67CA224AC62C00C6D57D /* NSString+Private.h in Headers */,
|
||||
62567F511C0CB5750025D458 /* HTMLDOMTokenList.h in Headers */,
|
||||
62ECBFB31C0B6D3C00AF847B /* HTMLKitDOMExceptions.h in Headers */,
|
||||
62ECBFB41C0B6D3D00AF847B /* HTMLNamespaces.h in Headers */,
|
||||
@@ -1400,11 +1512,13 @@
|
||||
62ECBFBD1C0B6D3F00AF847B /* CSSSelectorParser.h in Headers */,
|
||||
62ECBFBE1C0B6D4000AF847B /* CSSNthExpressionParser.h in Headers */,
|
||||
62ECBFBF1C0B6D4000AF847B /* CSSSelector.h in Headers */,
|
||||
6295FB0822F0E770005C6DE8 /* HTMLNodeVisitor.h in Headers */,
|
||||
621CC4A61DEA721A00D1992A /* HTMLParser+Private.h in Headers */,
|
||||
62ECBFC01C0B6D4000AF847B /* CSSSelectorBlock.h in Headers */,
|
||||
62ECBFC11C0B6D4100AF847B /* CSSTypeSelector.h in Headers */,
|
||||
62ECBFC21C0B6D4100AF847B /* CSSAttributeSelector.h in Headers */,
|
||||
62ECBFC31C0B6D4100AF847B /* CSSPseudoClassSelector.h in Headers */,
|
||||
62E0918022EDEB9D00C61073 /* HTMLSerializer.h in Headers */,
|
||||
62ECBFC41C0B6D4200AF847B /* CSSNthExpressionSelector.h in Headers */,
|
||||
62ECBFC51C0B6D4200AF847B /* CSSPseudoFunctionSelector.h in Headers */,
|
||||
62ECBFC61C0B6D4300AF847B /* CSSCombinatorSelector.h in Headers */,
|
||||
@@ -1573,7 +1687,7 @@
|
||||
625A14A319C7829400AD0C32 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 1240;
|
||||
ORGANIZATIONNAME = BrainCookie;
|
||||
TargetAttributes = {
|
||||
625A14C219C7829400AD0C32 = {
|
||||
@@ -1602,10 +1716,11 @@
|
||||
};
|
||||
buildConfigurationList = 625A14A619C7829400AD0C32 /* Build configuration list for PBXProject "HTMLKit" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 625A14A219C7829400AD0C32;
|
||||
productRefGroup = 625A14AD19C7829400AD0C32 /* Products */;
|
||||
@@ -1702,13 +1817,17 @@
|
||||
62ECBF251C0B6B7900AF847B /* HTMLEOFToken.m in Sources */,
|
||||
62ECBF261C0B6B7900AF847B /* HTMLParser.m in Sources */,
|
||||
62ECBF271C0B6B7900AF847B /* HTMLStackOfOpenElements.m in Sources */,
|
||||
62E0918322EDEB9D00C61073 /* HTMLSerializer.m in Sources */,
|
||||
62ECBF281C0B6B7900AF847B /* HTMLListOfActiveFormattingElements.m in Sources */,
|
||||
6295FB0B22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */,
|
||||
62ECBF291C0B6B7900AF847B /* HTMLMarker.m in Sources */,
|
||||
62ECBF2A1C0B6B7900AF847B /* HTMLNode.m in Sources */,
|
||||
62ECBF2B1C0B6B7900AF847B /* HTMLDocument.m in Sources */,
|
||||
62ECBF2C1C0B6B7900AF847B /* HTMLDocumentType.m in Sources */,
|
||||
625A67D2224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */,
|
||||
62ECBF2D1C0B6B7900AF847B /* HTMLDocumentFragment.m in Sources */,
|
||||
62ECBF2E1C0B6B7900AF847B /* HTMLElement.m in Sources */,
|
||||
6295FB1522F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */,
|
||||
62ECBF2F1C0B6B7900AF847B /* HTMLComment.m in Sources */,
|
||||
62ECBF301C0B6B7900AF847B /* HTMLText.m in Sources */,
|
||||
62ECBF311C0B6B7900AF847B /* HTMLTemplate.m in Sources */,
|
||||
@@ -1725,6 +1844,7 @@
|
||||
62ECBF3C1C0B6B7900AF847B /* CSSInputStream.m in Sources */,
|
||||
62ECBF3D1C0B6B7900AF847B /* CSSSelectorParser.m in Sources */,
|
||||
62ECBF3E1C0B6B7900AF847B /* CSSNthExpressionParser.m in Sources */,
|
||||
625A67CD224AC62C00C6D57D /* NSString+Private.m in Sources */,
|
||||
62ECBF3F1C0B6B7900AF847B /* CSSSelector.m in Sources */,
|
||||
62ECBF401C0B6B7900AF847B /* CSSSelectorBlock.m in Sources */,
|
||||
62ECBF411C0B6B7900AF847B /* CSSTypeSelector.m in Sources */,
|
||||
@@ -1745,8 +1865,10 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A851E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B12087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA971E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
6216ACFD1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */,
|
||||
62C82E0D20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */,
|
||||
62132E5A1C01F83200084175 /* CSSSelectorTest.m in Sources */,
|
||||
6239755B1AC362CA007E26F1 /* HTMLKitTreeConstructionTests.m in Sources */,
|
||||
62F658711BD83C8E0045F137 /* CSSNThExpressionSelectorTests.m in Sources */,
|
||||
@@ -1761,12 +1883,14 @@
|
||||
62567F561C0CC3AE0025D458 /* HTMLDOMTokenListTests.m in Sources */,
|
||||
624AC90219FBF9ED00BD3C4A /* HTMLKitTokenizerTests.m in Sources */,
|
||||
624B9FB31AE0313300646C4C /* HTMLStringCategoryTests.m in Sources */,
|
||||
62A95A4D1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
623916C81AC7209E0066B4FE /* HTMLNodeIteratorTests.m in Sources */,
|
||||
62D8345A19FB1AC4009205A9 /* HTML5LibTokenizerTest.m in Sources */,
|
||||
6239755F1AC364BB007E26F1 /* HTML5LibTreeConstructionTest.m in Sources */,
|
||||
624FC37B1AE591D80015DDF9 /* HTMLNodesTests.m in Sources */,
|
||||
621FBE5B1BDAD68700BC9555 /* CSSSelectorParserTests.m in Sources */,
|
||||
621FBE5E1BDAD90200BC9555 /* CSSCombinatorSelectorTests.m in Sources */,
|
||||
6295FB1A22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */,
|
||||
625EE45B1CBB171300F2CC8E /* HTMLKitTestUtil.m in Sources */,
|
||||
628AF6301BC99A6C00496128 /* CSSNthExpressionsParserTests.m in Sources */,
|
||||
);
|
||||
@@ -1789,13 +1913,17 @@
|
||||
62857C7B1D398912008DC254 /* HTMLTokenizer.m in Sources */,
|
||||
62857CB21D398992008DC254 /* HTMLDocument.m in Sources */,
|
||||
62857CBD1D398992008DC254 /* HTMLKitDOMExceptions.m in Sources */,
|
||||
62E0918622EDEB9D00C61073 /* HTMLSerializer.m in Sources */,
|
||||
62857CD11D3989B8008DC254 /* CSSPseudoFunctionSelector.m in Sources */,
|
||||
6295FB0E22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */,
|
||||
62857C7F1D398912008DC254 /* HTMLCommentToken.m in Sources */,
|
||||
62857C811D398912008DC254 /* HTMLParseErrorToken.m in Sources */,
|
||||
62857CD21D3989B8008DC254 /* CSSCombinatorSelector.m in Sources */,
|
||||
62857CB91D398992008DC254 /* HTMLNodeIterator.m in Sources */,
|
||||
625A67D5224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */,
|
||||
62857CCF1D3989B8008DC254 /* CSSPseudoClassSelector.m in Sources */,
|
||||
62857C7A1D398912008DC254 /* HTMLInputStreamReader.m in Sources */,
|
||||
6295FB1822F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */,
|
||||
62857CC11D39899C008DC254 /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
62857CCD1D3989B8008DC254 /* CSSTypeSelector.m in Sources */,
|
||||
62857C8E1D39892D008DC254 /* HTMLMarker.m in Sources */,
|
||||
@@ -1812,6 +1940,7 @@
|
||||
62857CBC1D398992008DC254 /* HTMLNodeFilter.m in Sources */,
|
||||
62857CC01D39899C008DC254 /* NSString+HTMLKit.m in Sources */,
|
||||
62857CCA1D3989B8008DC254 /* CSSInputStream.m in Sources */,
|
||||
625A67D0224AC62C00C6D57D /* NSString+Private.m in Sources */,
|
||||
62857CCE1D3989B8008DC254 /* CSSAttributeSelector.m in Sources */,
|
||||
62857CC31D3989A3008DC254 /* HTMLOrderedDictionary.m in Sources */,
|
||||
62857CC91D3989B8008DC254 /* CSSNthExpressionParser.m in Sources */,
|
||||
@@ -1844,13 +1973,17 @@
|
||||
62857D061D39A324008DC254 /* HTMLCommentToken.m in Sources */,
|
||||
62857D111D39A32A008DC254 /* HTMLDocumentType.m in Sources */,
|
||||
62857D1C1D39A32A008DC254 /* HTMLKitDOMExceptions.m in Sources */,
|
||||
62E0918522EDEB9D00C61073 /* HTMLSerializer.m in Sources */,
|
||||
62857D2B1D39A334008DC254 /* CSSPseudoFunctionSelector.m in Sources */,
|
||||
6295FB0D22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */,
|
||||
62857D081D39A324008DC254 /* HTMLParseErrorToken.m in Sources */,
|
||||
62857D0F1D39A32A008DC254 /* HTMLNode.m in Sources */,
|
||||
62857D2C1D39A334008DC254 /* CSSCombinatorSelector.m in Sources */,
|
||||
62857D181D39A32A008DC254 /* HTMLNodeIterator.m in Sources */,
|
||||
625A67D4224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */,
|
||||
62857D291D39A334008DC254 /* CSSPseudoClassSelector.m in Sources */,
|
||||
62857D011D39A324008DC254 /* HTMLInputStreamReader.m in Sources */,
|
||||
6295FB1722F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */,
|
||||
62857D1E1D39A334008DC254 /* NSCharacterSet+HTMLKit.m in Sources */,
|
||||
62857D271D39A334008DC254 /* CSSTypeSelector.m in Sources */,
|
||||
62857D0E1D39A328008DC254 /* HTMLMarker.m in Sources */,
|
||||
@@ -1867,6 +2000,7 @@
|
||||
62857D1B1D39A32A008DC254 /* HTMLNodeFilter.m in Sources */,
|
||||
62857D1D1D39A334008DC254 /* NSString+HTMLKit.m in Sources */,
|
||||
62857D241D39A334008DC254 /* CSSInputStream.m in Sources */,
|
||||
625A67CF224AC62C00C6D57D /* NSString+Private.m in Sources */,
|
||||
62857D281D39A334008DC254 /* CSSAttributeSelector.m in Sources */,
|
||||
62857D1F1D39A334008DC254 /* HTMLOrderedDictionary.m in Sources */,
|
||||
62857D231D39A334008DC254 /* CSSNthExpressionParser.m in Sources */,
|
||||
@@ -1887,8 +2021,10 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A871E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B32087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA991E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
62857D3B1D39A345008DC254 /* CSSSelectorTest.m in Sources */,
|
||||
62C82E0F20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */,
|
||||
62857D421D39A345008DC254 /* CSSCombinatorSelectorTests.m in Sources */,
|
||||
62857D3C1D39A345008DC254 /* CSSSelectorParserTests.m in Sources */,
|
||||
62857D301D39A339008DC254 /* HTMLKitTokenizerPerformance.m in Sources */,
|
||||
@@ -1903,12 +2039,14 @@
|
||||
62857D401D39A345008DC254 /* CSSAttributeSelectorTests.m in Sources */,
|
||||
62857D311D39A33C008DC254 /* HTML5LibTreeConstructionTest.m in Sources */,
|
||||
62857D391D39A342008DC254 /* HTMLOrderedDictionaryTests.m in Sources */,
|
||||
62A95A4F1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
62857D411D39A345008DC254 /* CSSNThExpressionSelectorTests.m in Sources */,
|
||||
62857D381D39A342008DC254 /* HTMLStringCategoryTests.m in Sources */,
|
||||
62857D331D39A33C008DC254 /* HTMLKitParserPerformance.m in Sources */,
|
||||
62857D341D39A33F008DC254 /* HTMLNodeIteratorTests.m in Sources */,
|
||||
62857D2E1D39A339008DC254 /* HTML5LibTokenizerTest.m in Sources */,
|
||||
62857D351D39A33F008DC254 /* HTMLTreeWalkerTests.m in Sources */,
|
||||
6295FB1C22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */,
|
||||
62857D441D39A34D008DC254 /* HTMLKitTestUtil.m in Sources */,
|
||||
62857D2F1D39A339008DC254 /* HTMLKitTokenizerTests.m in Sources */,
|
||||
);
|
||||
@@ -1931,13 +2069,17 @@
|
||||
62ECBF6D1C0B6D2A00AF847B /* HTMLEOFToken.m in Sources */,
|
||||
62ECBF6E1C0B6D2A00AF847B /* HTMLParser.m in Sources */,
|
||||
62ECBF6F1C0B6D2A00AF847B /* HTMLStackOfOpenElements.m in Sources */,
|
||||
62E0918422EDEB9D00C61073 /* HTMLSerializer.m in Sources */,
|
||||
62ECBF701C0B6D2A00AF847B /* HTMLListOfActiveFormattingElements.m in Sources */,
|
||||
6295FB0C22F0E770005C6DE8 /* HTMLNodeVisitor.m in Sources */,
|
||||
62ECBF711C0B6D2A00AF847B /* HTMLMarker.m in Sources */,
|
||||
62ECBF721C0B6D2A00AF847B /* HTMLNode.m in Sources */,
|
||||
62ECBF731C0B6D2A00AF847B /* HTMLDocument.m in Sources */,
|
||||
62ECBF741C0B6D2A00AF847B /* HTMLDocumentType.m in Sources */,
|
||||
625A67D3224ADC7700C6D57D /* HTMLQuircksMode.m in Sources */,
|
||||
62ECBF751C0B6D2A00AF847B /* HTMLDocumentFragment.m in Sources */,
|
||||
62ECBF761C0B6D2A00AF847B /* HTMLElement.m in Sources */,
|
||||
6295FB1622F0ECEE005C6DE8 /* HTMLTreeVisitor.m in Sources */,
|
||||
62ECBF771C0B6D2A00AF847B /* HTMLComment.m in Sources */,
|
||||
62ECBF781C0B6D2A00AF847B /* HTMLText.m in Sources */,
|
||||
62ECBF791C0B6D2A00AF847B /* HTMLTemplate.m in Sources */,
|
||||
@@ -1954,6 +2096,7 @@
|
||||
62ECBF841C0B6D2A00AF847B /* CSSInputStream.m in Sources */,
|
||||
62ECBF851C0B6D2A00AF847B /* CSSSelectorParser.m in Sources */,
|
||||
62ECBF861C0B6D2A00AF847B /* CSSNthExpressionParser.m in Sources */,
|
||||
625A67CE224AC62C00C6D57D /* NSString+Private.m in Sources */,
|
||||
62ECBF871C0B6D2A00AF847B /* CSSSelector.m in Sources */,
|
||||
62ECBF881C0B6D2A00AF847B /* CSSSelectorBlock.m in Sources */,
|
||||
62ECBF891C0B6D2A00AF847B /* CSSTypeSelector.m in Sources */,
|
||||
@@ -1974,8 +2117,10 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
62EC0A861E158BD80007786B /* HTMLRangeTests.m in Sources */,
|
||||
620AB7B22087F18D00AFCCC7 /* CSSStructuralPseudoSelectors.m in Sources */,
|
||||
62E0BA981E25456700E4D193 /* HTMLCharacterDataTests.m in Sources */,
|
||||
6216ACFE1C28DCC80074CAB4 /* CSSExtensionSelectorsParsingTests.m in Sources */,
|
||||
62C82E0E20FD2FFD008497A8 /* HTMLKitParserIssuesTests.m in Sources */,
|
||||
62ECBFCA1C0B6E2E00AF847B /* HTML5LibTokenizerTest.m in Sources */,
|
||||
62ECBFCB1C0B6E2E00AF847B /* HTMLKitTokenizerTests.m in Sources */,
|
||||
62ECBFCC1C0B6E2E00AF847B /* HTMLKitTokenizerPerformance.m in Sources */,
|
||||
@@ -1990,12 +2135,14 @@
|
||||
62567F571C0CC3AE0025D458 /* HTMLDOMTokenListTests.m in Sources */,
|
||||
62ECBFD41C0B6E2E00AF847B /* HTMLStringCategoryTests.m in Sources */,
|
||||
62ECBFD51C0B6E2E00AF847B /* HTMLOrderedDictionaryTests.m in Sources */,
|
||||
62A95A4E1FB0FBFC0009FF26 /* HTMLSerializationTests.m in Sources */,
|
||||
62ECBFD61C0B6E2E00AF847B /* CSSSelectorTest.m in Sources */,
|
||||
62ECBFD71C0B6E2E00AF847B /* CSSSelectorParserTests.m in Sources */,
|
||||
62ECBFD81C0B6E2E00AF847B /* CSSNthExpressionsParserTests.m in Sources */,
|
||||
62ECBFD91C0B6E2E00AF847B /* CSSTypeSelectorTests.m in Sources */,
|
||||
62ECBFDA1C0B6E2E00AF847B /* CSSAttributeSelectorTests.m in Sources */,
|
||||
62ECBFDB1C0B6E2E00AF847B /* CSSNThExpressionSelectorTests.m in Sources */,
|
||||
6295FB1B22F0F309005C6DE8 /* HTMLTreeVisitorTests.m in Sources */,
|
||||
625EE45C1CBB171300F2CC8E /* HTMLKitTestUtil.m in Sources */,
|
||||
62ECBFDC1C0B6E2E00AF847B /* CSSCombinatorSelectorTests.m in Sources */,
|
||||
);
|
||||
@@ -2026,6 +2173,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -2034,14 +2182,17 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -2066,7 +2217,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
@@ -2076,6 +2227,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -2084,14 +2236,17 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -2110,7 +2265,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
@@ -2118,6 +2273,7 @@
|
||||
625A14D519C7829400AD0C32 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
@@ -2127,14 +2283,18 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "@rpath";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
@@ -2143,6 +2303,7 @@
|
||||
625A14D619C7829400AD0C32 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
@@ -2152,14 +2313,18 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "@rpath";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
@@ -2181,11 +2346,11 @@
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.${PRODUCT_NAME:rfc1034identifier}";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
@@ -2203,11 +2368,11 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.${PRODUCT_NAME:rfc1034identifier}";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
WRAPPER_EXTENSION = xctest;
|
||||
};
|
||||
@@ -2218,6 +2383,7 @@
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
@@ -2229,19 +2395,22 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_MODULE_NAME = HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
@@ -2253,6 +2422,7 @@
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@@ -2264,19 +2434,22 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_MODULE_NAME = HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -2288,6 +2461,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
|
||||
@@ -2301,18 +2475,21 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
@@ -2323,6 +2500,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=*]" = "iPhone Developer";
|
||||
@@ -2336,18 +2514,21 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = appletvos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -2364,13 +2545,13 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.HTMLKit-tvOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.HTMLKit-tvOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -2384,13 +2565,13 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.HTMLKit-tvOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.HTMLKit-tvOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
@@ -2399,6 +2580,7 @@
|
||||
62ECBF5F1C0B6C7600AF847B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
@@ -2411,21 +2593,24 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
@@ -2435,6 +2620,7 @@
|
||||
62ECBF601C0B6C7600AF847B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
@@ -2447,21 +2633,24 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
INFOPLIST_FILE = "Sources/HTMLKit-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MARKETING_VERSION = 4.2.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.iabudiab.HTMLKit;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.iabudiab.HTMLKit;
|
||||
PRODUCT_NAME = HTMLKit;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -2478,13 +2667,13 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.HTMLKit-iOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.HTMLKit-iOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -2498,13 +2687,13 @@
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Tests/HTMLKitTests/HTMLKitTests-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.iabudiab.HTMLKit-iOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "dev.iabudiab.HTMLKit-iOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 12.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1250"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,9 +26,17 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "62ECBF4C1C0B6C7600AF847B"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-iOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -55,23 +63,11 @@
|
||||
</SkippedTests>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "62ECBF4C1C0B6C7600AF847B"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-iOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -87,8 +83,6 @@
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1250"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,9 +26,17 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "625A14AB19C7829400AD0C32"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-macOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -55,23 +63,11 @@
|
||||
</SkippedTests>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "625A14AB19C7829400AD0C32"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-macOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -87,8 +83,6 @@
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1250"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,9 +26,17 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "62857CE91D39A262008DC254"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-tvOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -49,23 +57,11 @@
|
||||
</SkippedTests>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "62857CE91D39A262008DC254"
|
||||
BuildableName = "HTMLKit.framework"
|
||||
BlueprintName = "HTMLKit-tvOS"
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -81,8 +77,6 @@
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1250"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,19 +26,15 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -54,8 +50,6 @@
|
||||
ReferencedContainer = "container:HTMLKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Iskandar Abudiab
|
||||
Copyright (c) 2014-2020 Iskandar Abudiab
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
// swift-tools-version:5.1
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "HTMLKit",
|
||||
exclude: ["Tests/Fixtures", "Tests/css-tests", "Tests/html5lib-tests"]
|
||||
products: [.library(name: "HTMLKit", targets: ["HTMLKit"])],
|
||||
targets: [.target(name: "HTMLKit", dependencies: [], path: "Sources")],
|
||||
swiftLanguageVersions: [.v5]
|
||||
)
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
# HTMLKit
|
||||
|
||||

|
||||

|
||||
|
||||
An Objective-C framework for your everyday HTML needs.
|
||||
|
||||
[](https://travis-ci.org/iabudiab/HTMLKit)
|
||||
[](https://codecov.io/gh/iabudiab/HTMLKit)
|
||||
[](https://github.com/iabudiab/HTMLKit/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/iabudiab/HTMLKit)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org/pods/HTMLKit)
|
||||
[](http://cocoadocs.org/docsets/HTMLKit)
|
||||
[](http://cocoadocs.org/docsets/HTMLKit)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
@@ -76,10 +75,8 @@ $ gem install cocoapods
|
||||
To add `HTMLKit` as a dependency into your project using CocoaPods just add the following in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
use_frameworks!
|
||||
|
||||
target 'MyTarget' do
|
||||
pod 'HTMLKit', '~> 2.0'
|
||||
pod 'HTMLKit', '~> 4.2'
|
||||
end
|
||||
```
|
||||
|
||||
@@ -96,7 +93,7 @@ $ pod install
|
||||
Add `HTMLKit` to your `Package.swift` dependecies:
|
||||
|
||||
```swift
|
||||
.Package(url: "https://github.com/iabudiab/HTMLKit", majorVersion: 2)
|
||||
.package(url: "https://github.com/iabudiab/HTMLKit", .upToNextMajor(from: "4.0.0")),
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
case CSSAttributeSelectorIncludes:
|
||||
{
|
||||
NSArray *components = [element[_name] componentsSeparatedByCharactersInSet:[NSCharacterSet HTMLWhitespaceCharacterSet]];
|
||||
NSArray *components = [element[_name] componentsSeparatedByCharactersInSet:[NSCharacterSet htmlkit_HTMLWhitespaceCharacterSet]];
|
||||
return [components containsObject:_value];
|
||||
}
|
||||
case CSSAttributeSelectorBegins:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#import "CSSNthExpressionParser.h"
|
||||
#import "CSSCodePoints.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
#import "NSCharacterSet+HTMLKit.h"
|
||||
|
||||
@implementation CSSNthExpressionParser
|
||||
@@ -26,7 +26,7 @@
|
||||
return CSSNthExpressionEven;
|
||||
}
|
||||
|
||||
NSCharacterSet *set = [[NSCharacterSet CSSNthExpressionCharacterSet] invertedSet];
|
||||
NSCharacterSet *set = [[NSCharacterSet htmlkit_CSSNthExpressionCharacterSet] invertedSet];
|
||||
if ([string rangeOfCharacterFromSet:set].location != NSNotFound) {
|
||||
return CSSNthExpressionMake(0, 0);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ NSString * _Nonnull NSStringFromNthExpression(CSSNthExpression expression)
|
||||
|
||||
#pragma mark - Implementation
|
||||
|
||||
NSInteger computeIndex(NSEnumerator *enumerator, HTMLElement *element)
|
||||
NS_INLINE NSInteger computeIndex(NSEnumerator *enumerator, HTMLElement *element)
|
||||
{
|
||||
NSInteger index = 0;
|
||||
for (HTMLNode *node in enumerator) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import "CSSInputStream.h"
|
||||
#import "CSSCodePoints.h"
|
||||
#import "CSSSelectors.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
#import "NSCharacterSet+HTMLKit.h"
|
||||
#import "CSSNthExpressionParser.h"
|
||||
#import "CSSCompoundSelector.h"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "CSSStructuralPseudoSelectors.h"
|
||||
#import "CSSSelectors.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
|
||||
#pragma mark - Elements
|
||||
|
||||
@@ -276,7 +276,7 @@ CSSSelector * ltSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex < index;
|
||||
} else {
|
||||
return elementIndex < element.parentElement.childNodesCount - index - 1;
|
||||
@@ -290,7 +290,7 @@ CSSSelector * gtSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex > index;
|
||||
} else {
|
||||
return elementIndex > element.parentElement.childNodesCount - index - 1;
|
||||
@@ -304,7 +304,7 @@ CSSSelector * eqSelector(NSInteger index)
|
||||
return namedBlockSelector(name, ^BOOL(HTMLElement * _Nonnull element) {
|
||||
NSUInteger elementIndex = [element.parentElement indexOfChildNode:element];
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
return elementIndex == index;
|
||||
} else {
|
||||
return elementIndex == element.parentElement.childNodesCount - index - 1;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#import "CSSTypeSelector.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
|
||||
@interface CSSTypeSelector ()
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
- (BOOL)isWhitespaceToken
|
||||
{
|
||||
return [_characters isHTMLWhitespaceString];
|
||||
return [_characters htmlkit_isHTMLWhitespaceString];
|
||||
}
|
||||
|
||||
- (BOOL)isEmpty
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
- (void)retainLeadingWhitespace
|
||||
{
|
||||
NSUInteger index = _characters.leadingHTMLWhitespaceLength;
|
||||
NSUInteger index = _characters.htmlkit_leadingHTMLWhitespaceLength;
|
||||
if (index > 0) {
|
||||
[_characters setString:[_characters substringToIndex:index]];
|
||||
}
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
- (void)trimLeadingWhitespace
|
||||
{
|
||||
NSUInteger index = _characters.leadingHTMLWhitespaceLength;
|
||||
NSUInteger index = _characters.htmlkit_leadingHTMLWhitespaceLength;
|
||||
if (index > 0) {
|
||||
[_characters setString:[_characters substringFromIndex:index]];
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
- (HTMLCharacterToken *)tokenBySplitingLeadingWhiteSpace
|
||||
{
|
||||
NSUInteger index = _characters.leadingHTMLWhitespaceLength;
|
||||
NSUInteger index = _characters.htmlkit_leadingHTMLWhitespaceLength;
|
||||
if (index > 0) {
|
||||
NSString *leading = [_characters substringToIndex:index];
|
||||
[_characters setString:[_characters substringFromIndex:index]];
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
return [super initWithName:@"#comment" type:HTMLNodeComment data:data];
|
||||
}
|
||||
|
||||
#pragma mark - Serialization
|
||||
|
||||
- (NSString *)outerHTML
|
||||
{
|
||||
return [NSString stringWithFormat:@"<!--%@-->", self.data];
|
||||
}
|
||||
|
||||
#pragma mark - Description
|
||||
|
||||
- (NSString *)description
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
- (void)detachNodeIterator:(HTMLNodeIterator *)iterator
|
||||
{
|
||||
[_nodeIterators removeObject:iterator];
|
||||
// NOOP
|
||||
}
|
||||
|
||||
#pragma mark - Ranges
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
- (void)detachRange:(HTMLRange *)range
|
||||
{
|
||||
[_ranges removeObject:range];
|
||||
// NOOP
|
||||
}
|
||||
|
||||
- (void)didRemoveCharacterDataInNode:(HTMLCharacterData *)node atOffset:(NSUInteger)offset withLength:(NSUInteger)length
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import "HTMLDocumentType.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
#import "HTMLNode+Private.h"
|
||||
|
||||
NS_INLINE BOOL nilOrEqual(id first, id second) {
|
||||
@@ -144,13 +144,6 @@ NS_INLINE BOOL nilOrEqual(id first, id second) {
|
||||
return copy;
|
||||
}
|
||||
|
||||
#pragma mark - Serialization
|
||||
|
||||
- (NSString *)outerHTML
|
||||
{
|
||||
return [NSString stringWithFormat:@"<!DOCTYPE %@>", self.name];
|
||||
}
|
||||
|
||||
#pragma mark - Description
|
||||
|
||||
- (NSString *)description
|
||||
|
||||
+2
-39
@@ -12,7 +12,7 @@
|
||||
#import "HTMLText.h"
|
||||
#import "HTMLDOMTokenList.h"
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
#import "HTMLNode+Private.h"
|
||||
|
||||
@interface HTMLElement ()
|
||||
@@ -144,48 +144,11 @@
|
||||
{
|
||||
HTMLElement *copy = [super copyWithZone:zone];
|
||||
copy->_tagName = [_tagName copy];
|
||||
copy->_attributes = [_attributes copy];
|
||||
copy->_attributes = [_attributes mutableCopy];
|
||||
copy->_htmlNamespace = _htmlNamespace;
|
||||
return copy;
|
||||
}
|
||||
|
||||
#pragma mark - Serialization
|
||||
|
||||
- (NSString *)outerHTML
|
||||
{
|
||||
NSMutableString *result = [NSMutableString string];
|
||||
|
||||
[result appendFormat:@"<%@", self.tagName];
|
||||
[self.attributes enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
|
||||
NSRange range = NSMakeRange(0, value.length);
|
||||
NSMutableString *escaped = [value mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\"" withString:@""" options:0 range:range];
|
||||
|
||||
[result appendFormat:@" %@=\"%@\"", key, escaped];
|
||||
}];
|
||||
|
||||
[result appendString:@">"];
|
||||
|
||||
if ([self.tagName isEqualToAny:@"area", @"base", @"basefont", @"bgsound", @"br", @"col", @"embed",
|
||||
@"frame", @"hr", @"img", @"input", @"keygen", @"link", @"menuitem", @"meta", @"param", @"source",
|
||||
@"track", @"wbr", nil]) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if ([self.tagName isEqualToAny:@"pre", @"textarea", @"listing", nil] && self.firstChild.nodeType == HTMLNodeText) {
|
||||
HTMLText *textNode = (HTMLText *)self.firstChild;
|
||||
if ([textNode.data hasPrefix:@"\n"]) {
|
||||
[result appendString:@"\n"];
|
||||
}
|
||||
}
|
||||
[result appendString:self.innerHTML];
|
||||
[result appendFormat:@"</%@>", self.tagName];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark - Description
|
||||
|
||||
- (NSString *)description
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
- (BOOL)consumeHexNumber:(unsigned long long *)result
|
||||
{
|
||||
NSCharacterSet *set = [NSCharacterSet HTMLHexNumberCharacterSet];
|
||||
NSCharacterSet *set = [NSCharacterSet htmlkit_HTMLHexNumberCharacterSet];
|
||||
|
||||
NSString *string = nil;
|
||||
BOOL success = [_scanner scanCharactersFromSet:set intoString:&string];
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.1</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014 BrainCookie. All rights reserved.</string>
|
||||
<string>Copyright © 2014 iabudiab. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
|
||||
+22
-8
@@ -18,6 +18,7 @@
|
||||
#import "CSSSelector.h"
|
||||
#import "HTMLDocument+Private.h"
|
||||
#import "HTMLDOMUtils.h"
|
||||
#import "HTMLSerializer.h"
|
||||
|
||||
NSString * const ValidationNodePreInsertion = @"-ensurePreInsertionValidityOfNode:beforeChildNode:";
|
||||
NSString * const ValidationNodeReplacement = @"-ensureReplacementValidityOfChildNode:withNode:";
|
||||
@@ -127,7 +128,7 @@ NSString * const RemoveChildNode = @"-removeChildNode:";
|
||||
|
||||
- (HTMLElement *)nextSiblingElement
|
||||
{
|
||||
HTMLNode *node = self.previousSibling;
|
||||
HTMLNode *node = self.nextSibling;
|
||||
while (node && node.nodeType != HTMLNodeElement) {
|
||||
node = node.nextSibling;
|
||||
}
|
||||
@@ -156,6 +157,20 @@ NSString * const RemoveChildNode = @"-removeChildNode:";
|
||||
return (HTMLElement *)self;
|
||||
}
|
||||
|
||||
- (HTMLText *)asText
|
||||
{
|
||||
return (HTMLText *)self;
|
||||
}
|
||||
|
||||
- (HTMLComment *)asComment
|
||||
{
|
||||
return (HTMLComment *)self;
|
||||
}
|
||||
- (HTMLDocumentType *)asDocumentType
|
||||
{
|
||||
return (HTMLDocumentType *)self;
|
||||
}
|
||||
|
||||
#pragma mark - Child Nodes
|
||||
|
||||
- (BOOL)hasChildNodes
|
||||
@@ -368,16 +383,16 @@ NSString * const RemoveChildNode = @"-removeChildNode:";
|
||||
}
|
||||
|
||||
if (self.ownerDocument != otherNode.ownerDocument) {
|
||||
return (HTMLDocumentPositionDisconnected | HTMLDocumentPositionImplementationSpecific |
|
||||
self.hash < otherNode.hash ? HTMLDocumentPositionPreceding : HTMLDocumentPositionFollowing);
|
||||
return ((HTMLDocumentPositionDisconnected | HTMLDocumentPositionImplementationSpecific |
|
||||
self.hash < otherNode.hash) ? HTMLDocumentPositionPreceding : HTMLDocumentPositionFollowing);
|
||||
}
|
||||
|
||||
NSArray *ancestors1 = GetAncestorNodes(self);
|
||||
NSArray *ancestors2 = GetAncestorNodes(otherNode);
|
||||
|
||||
if (ancestors1.lastObject != ancestors2.lastObject) {
|
||||
return (HTMLDocumentPositionDisconnected | HTMLDocumentPositionImplementationSpecific |
|
||||
self.hash < otherNode.hash ? HTMLDocumentPositionPreceding : HTMLDocumentPositionFollowing);
|
||||
return ((HTMLDocumentPositionDisconnected | HTMLDocumentPositionImplementationSpecific |
|
||||
self.hash < otherNode.hash) ? HTMLDocumentPositionPreceding : HTMLDocumentPositionFollowing);
|
||||
}
|
||||
|
||||
NSUInteger index1 = ancestors1.count;
|
||||
@@ -718,13 +733,12 @@ NS_INLINE void CheckInvalidCombination(HTMLNode *parent, HTMLNode *node, NSStrin
|
||||
|
||||
- (NSString *)outerHTML
|
||||
{
|
||||
[self doesNotRecognizeSelector:_cmd];
|
||||
return nil;
|
||||
return [HTMLSerializer serializeNode:self scope:HTMLSerializationScopeIncludeRoot];
|
||||
}
|
||||
|
||||
- (NSString *)innerHTML
|
||||
{
|
||||
return [[self.childNodes.array valueForKey:@"outerHTML"] componentsJoinedByString:@""];
|
||||
return [HTMLSerializer serializeNode:self scope:HTMLSerializationScopeChildrenOnly];
|
||||
}
|
||||
|
||||
- (void)setInnerHTML:(NSString *)outerHTML
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@interface HTMLNodeFilterBlock ()
|
||||
{
|
||||
BOOL (^ _block)(HTMLNode *);
|
||||
HTMLNodeFilterValue (^ _block)(HTMLNode *);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// HTMLNodeVisitor.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 30.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLNodeVisitor.h"
|
||||
|
||||
#pragma mark - Block Visitor
|
||||
|
||||
@interface HTMLNodeVisitorBlock ()
|
||||
{
|
||||
void (^ _enter)(HTMLNode *);
|
||||
void (^ _leave)(HTMLNode *);
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLNodeVisitorBlock
|
||||
|
||||
+ (instancetype)visitorWithEnterBlock:(void (^)(HTMLNode * _Nonnull))enterBlock
|
||||
leaveBlock:(void (^)(HTMLNode * _Nonnull))leaveBlock
|
||||
{
|
||||
return [[HTMLNodeVisitorBlock alloc] initWithEnterBlock:enterBlock leaveBlock:leaveBlock];
|
||||
}
|
||||
|
||||
- (instancetype)initWithEnterBlock:(void (^)(HTMLNode * _Nonnull))enterBlock
|
||||
leaveBlock:(void (^)(HTMLNode * _Nonnull))leaveBlock
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_enter = [enterBlock copy];
|
||||
_leave = [leaveBlock copy];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)enter:(HTMLNode *)node
|
||||
{
|
||||
if (_enter) {
|
||||
_enter(node);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)leave:(HTMLNode *)node
|
||||
{
|
||||
if (_leave) {
|
||||
_leave(node);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -154,4 +154,11 @@
|
||||
return [_keys countByEnumeratingWithState:state objects:buffer count:len];
|
||||
}
|
||||
|
||||
#pragma mark - Copying
|
||||
|
||||
- (id)mutableCopy
|
||||
{
|
||||
return [[HTMLOrderedDictionary alloc] initWithDictionary:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+27
-34
@@ -1142,7 +1142,7 @@
|
||||
if (charactes.length > 0) {
|
||||
[self reconstructActiveFormattingElements];
|
||||
[self insertCharacters:charactes];
|
||||
if (!charactes.isHTMLWhitespaceString) {
|
||||
if (!charactes.htmlkit_isHTMLWhitespaceString) {
|
||||
_framesetOkFlag = NO;
|
||||
}
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@
|
||||
_framesetOkFlag = NO;
|
||||
} else if ([tagName isEqualToString:@"a"]) {
|
||||
HTMLElement *element = ^ HTMLElement * {
|
||||
for (HTMLElement *element in _listOfActiveFormattingElements.reverseObjectEnumerator) {
|
||||
for (HTMLElement *element in self->_listOfActiveFormattingElements.reverseObjectEnumerator) {
|
||||
if ([element isEqual:[HTMLMarker marker]]) return nil;
|
||||
if ([element.tagName isEqualToString:@"a"]) {
|
||||
return element;
|
||||
@@ -1443,7 +1443,6 @@
|
||||
} else if ([tagName isEqualToString:@"math"]) {
|
||||
[self reconstructActiveFormattingElements];
|
||||
AdjustMathMLAttributes(token);
|
||||
AdjustForeignAttributes(token);
|
||||
[self insertForeignElementForToken:token inNamespace:HTMLNamespaceMathML];
|
||||
if (token.isSelfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
@@ -1451,7 +1450,6 @@
|
||||
} else if ([tagName isEqualToString:@"svg"]) {
|
||||
[self reconstructActiveFormattingElements];
|
||||
AdjustSVGAttributes(token);
|
||||
AdjustForeignAttributes(token);
|
||||
[self insertForeignElementForToken:token inNamespace:HTMLNamespaceSVG];
|
||||
if (token.isSelfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
@@ -1778,7 +1776,7 @@
|
||||
- (void)HTMLInsertionModeInCaption:(HTMLToken *)token
|
||||
{
|
||||
void (^ common) (BOOL) = ^ (BOOL reprocess) {
|
||||
if (![_stackOfOpenElements hasElementInTableScopeWithTagName:@"caption"]) {
|
||||
if (![self->_stackOfOpenElements hasElementInTableScopeWithTagName:@"caption"]) {
|
||||
[self emitParseError:@"Unexpected end tag </caption> for misnested element in <caption>"];
|
||||
return;
|
||||
}
|
||||
@@ -1786,8 +1784,8 @@
|
||||
if (![self.currentNode.tagName isEqualToString:@"caption"]) {
|
||||
[self emitParseError:@"Misnested <caption> element in <caption>"];
|
||||
}
|
||||
[_stackOfOpenElements popElementsUntilElementPoppedWithTagName:@"caption"];
|
||||
[_listOfActiveFormattingElements clearUptoLastMarker];
|
||||
[self->_stackOfOpenElements popElementsUntilElementPoppedWithTagName:@"caption"];
|
||||
[self->_listOfActiveFormattingElements clearUptoLastMarker];
|
||||
[self switchInsertionMode:HTMLInsertionModeInTable];
|
||||
|
||||
if (reprocess) {
|
||||
@@ -1892,12 +1890,12 @@
|
||||
- (void)HTMLInsertionModeInTableBody:(HTMLToken *)token
|
||||
{
|
||||
void (^ common) (BOOL) = ^ (BOOL reprocess) {
|
||||
if (![_stackOfOpenElements hasElementInTableScopeWithAnyOfTagNames:@[@"tbody", @"tfoot", @"thead"]]) {
|
||||
if (![self->_stackOfOpenElements hasElementInTableScopeWithAnyOfTagNames:@[@"tbody", @"tfoot", @"thead"]]) {
|
||||
[self emitParseError:@"Unexpected tag '%@' for misnested element in <tbody>", token.asTagToken.tagName];
|
||||
return;
|
||||
} else {
|
||||
[_stackOfOpenElements clearBackToTableBodyContext];
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
[self->_stackOfOpenElements clearBackToTableBodyContext];
|
||||
[self->_stackOfOpenElements popCurrentNode];
|
||||
[self switchInsertionMode:HTMLInsertionModeInTable];
|
||||
}
|
||||
|
||||
@@ -1948,12 +1946,12 @@
|
||||
- (void)HTMLInsertionModeInRow:(HTMLToken *)token
|
||||
{
|
||||
void (^ common) (NSString *, BOOL) = ^ (NSString *elementTagName, BOOL reprocess) {
|
||||
if (![_stackOfOpenElements hasElementInTableScopeWithTagName:elementTagName]) {
|
||||
if (![self->_stackOfOpenElements hasElementInTableScopeWithTagName:elementTagName]) {
|
||||
[self emitParseError:@"Unexpected tag '%@' for misnested element <%@> in <tr>", token.asTagToken.tagName, elementTagName];
|
||||
return;
|
||||
} else {
|
||||
[_stackOfOpenElements clearBackToTableRowContext];
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
[self->_stackOfOpenElements clearBackToTableRowContext];
|
||||
[self->_stackOfOpenElements popCurrentNode];
|
||||
[self switchInsertionMode:HTMLInsertionModeInTableBody];
|
||||
}
|
||||
|
||||
@@ -2315,7 +2313,7 @@
|
||||
[characters enumerateSubstringsInRange:NSMakeRange(0, characters.length)
|
||||
options:NSStringEnumerationByComposedCharacterSequences
|
||||
usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
|
||||
if (substring.isHTMLWhitespaceString) {
|
||||
if (substring.htmlkit_isHTMLWhitespaceString) {
|
||||
[self insertCharacters:substring];
|
||||
} else {
|
||||
[self emitParseError:@"Unexpected Character (%@) in <frameset>", substring];
|
||||
@@ -2383,7 +2381,7 @@
|
||||
[characters enumerateSubstringsInRange:NSMakeRange(0, characters.length)
|
||||
options:NSStringEnumerationByComposedCharacterSequences
|
||||
usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
|
||||
if (substring.isHTMLWhitespaceString) {
|
||||
if (substring.htmlkit_isHTMLWhitespaceString) {
|
||||
[self insertCharacters:substring];
|
||||
} else {
|
||||
[self emitParseError:@"Unexpected Character (%@) after <frameset>", substring];
|
||||
@@ -2515,13 +2513,13 @@
|
||||
[characters enumerateSubstringsInRange:NSMakeRange(0, characters.length)
|
||||
options:NSStringEnumerationByComposedCharacterSequences
|
||||
usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
|
||||
if ([substring isEqualToString:@"\uFFFD"]) {
|
||||
[self emitParseError:@"Unexpected Character (0x0000) in foreign content"];
|
||||
} else if (!substring.isHTMLWhitespaceString) {
|
||||
_framesetOkFlag = NO;
|
||||
}
|
||||
[self insertCharacters:substring];
|
||||
}];
|
||||
if ([substring isEqualToString:@"\uFFFD"]) {
|
||||
[self emitParseError:@"Unexpected Character (0x0000) in foreign content"];
|
||||
} else if (!substring.htmlkit_isHTMLWhitespaceString) {
|
||||
self->_framesetOkFlag = NO;
|
||||
}
|
||||
[self insertCharacters:substring];
|
||||
}];
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2541,26 +2539,21 @@
|
||||
AdjustSVGNameCase(token.asTagToken);
|
||||
AdjustSVGAttributes(token.asTagToken);
|
||||
}
|
||||
AdjustForeignAttributes(token.asTagToken);
|
||||
[self insertForeignElementForToken:token.asTagToken inNamespace:self.adjustedCurrentNode.htmlNamespace];
|
||||
if (token.asTagToken.selfClosing) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
[self->_stackOfOpenElements popCurrentNode];
|
||||
}
|
||||
};
|
||||
|
||||
void (^ matchedCase)(void) = ^ {
|
||||
[self emitParseError:@"Unexpected start tag <%@> in foreign content", token.asTagToken.tagName];
|
||||
if (_fragmentParsingAlgorithm) {
|
||||
anythingElse();
|
||||
} else {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
while (!IsNodeMathMLTextIntegrationPoint(self.currentNode) &&
|
||||
!IsNodeHTMLIntegrationPoint(self.currentNode) &&
|
||||
self.currentNode.htmlNamespace != HTMLNamespaceHTML) {
|
||||
[_stackOfOpenElements popCurrentNode];
|
||||
}
|
||||
[self reprocessToken:token];
|
||||
|
||||
while (!IsNodeMathMLTextIntegrationPoint(self.currentNode) &&
|
||||
!IsNodeHTMLIntegrationPoint(self.currentNode) &&
|
||||
self.currentNode.htmlNamespace != HTMLNamespaceHTML) {
|
||||
[self->_stackOfOpenElements popCurrentNode];
|
||||
}
|
||||
[self processToken:token byApplyingRulesForInsertionMode:HTMLInsertionModeInBody];
|
||||
};
|
||||
|
||||
if ([token.asTagToken.tagName isEqualToAny:@"b", @"big", @"blockquote", @"body", @"br",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// HTMLQuircksMode.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.03.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLQuirksMode.h"
|
||||
#import "NSString+Private.h"
|
||||
|
||||
BOOL QuirksModePrefixMatch(NSString *publicIdentifier)
|
||||
{
|
||||
for (int i = 0; i < sizeof(HTMLQuirksModePrefixes) / sizeof(HTMLQuirksModePrefixes[0]); i++) {
|
||||
if ([publicIdentifier hasPrefixIgnoringCase:HTMLQuirksModePrefixes[i]]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
//
|
||||
// HTMLSerializer.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 28.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLSerializer.h"
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLNode+Private.h"
|
||||
#import "HTMLTreeVisitor.h"
|
||||
#import "NSString+Private.h"
|
||||
|
||||
#pragma mark - Serializer
|
||||
|
||||
@interface HTMLSerializer ()
|
||||
{
|
||||
HTMLNode *_root;
|
||||
HTMLTreeVisitor *_treeVisitor;
|
||||
NSUInteger _ignore;
|
||||
NSMutableString *_result;
|
||||
}
|
||||
- (instancetype)initWithNode:(HTMLNode *)node;
|
||||
- (NSString *)serializeWithScope:(HTMLSerializationScope)scope;
|
||||
@end
|
||||
|
||||
@implementation HTMLSerializer
|
||||
|
||||
+ (NSString *)serializeNode:(HTMLNode *)node scope:(HTMLSerializationScope)scope
|
||||
{
|
||||
HTMLSerializer *serializer = [[HTMLSerializer alloc] initWithNode:node];
|
||||
return [serializer serializeWithScope:scope];
|
||||
}
|
||||
|
||||
#pragma mark - Lifecycle
|
||||
|
||||
- (instancetype)initWithNode:(HTMLNode *)node
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_root = node;
|
||||
_treeVisitor = [[HTMLTreeVisitor alloc] initWithNode:node];
|
||||
_result = [NSMutableString new];
|
||||
_ignore = 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Serialization
|
||||
|
||||
- (NSString *)serializeWithScope:(HTMLSerializationScope)scope
|
||||
{
|
||||
[_result setString:@""];
|
||||
|
||||
HTMLNodeVisitorBlock *nodeVisitor = [HTMLNodeVisitorBlock visitorWithEnterBlock:^(HTMLNode * node) {
|
||||
if (scope == HTMLSerializationScopeChildrenOnly && node == self->_root) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self->_ignore > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (node.nodeType) {
|
||||
case HTMLNodeElement:
|
||||
[self openElement:node.asElement];
|
||||
break;
|
||||
case HTMLNodeComment:
|
||||
[self serializeComment:node.asComment];
|
||||
break;
|
||||
case HTMLNodeText:
|
||||
[self serializeText:node.asText];
|
||||
break;
|
||||
case HTMLNodeDocumentFragment:
|
||||
[self serializeDocumentType:node.asDocumentType];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} leaveBlock:^(HTMLNode * _Nonnull node) {
|
||||
if (scope == HTMLSerializationScopeChildrenOnly && node == self->_root) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (node.nodeType) {
|
||||
case HTMLNodeElement:
|
||||
if ([node.asElement.tagName isEqualToAny:@"area", @"base", @"basefont", @"bgsound", @"br", @"col", @"embed",
|
||||
@"frame", @"hr", @"img", @"input", @"keygen", @"link", @"menuitem", @"meta", @"param", @"source",
|
||||
@"track", @"wbr", nil]) {
|
||||
self->_ignore--;
|
||||
break;
|
||||
}
|
||||
[self closeElement:node.asElement];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
|
||||
[_treeVisitor walkWithNodeVisitor:nodeVisitor];
|
||||
return [_result copy];
|
||||
}
|
||||
|
||||
- (void)openElement:(HTMLElement *)element
|
||||
{
|
||||
[_result appendFormat:@"<%@", element.tagName];
|
||||
[element.attributes enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
|
||||
NSMutableString *escaped = [value mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"0x00A0" withString:@" " options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"\"" withString:@""" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
|
||||
[_result appendFormat:@" %@=\"%@\"", key, escaped];
|
||||
}];
|
||||
|
||||
[_result appendString:@">"];
|
||||
|
||||
if ([element.tagName isEqualToAny:@"area", @"base", @"basefont", @"bgsound", @"br", @"col", @"embed",
|
||||
@"frame", @"hr", @"img", @"input", @"keygen", @"link", @"menuitem", @"meta", @"param", @"source",
|
||||
@"track", @"wbr", nil]) {
|
||||
_ignore++;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)closeElement:(HTMLElement *)element
|
||||
{
|
||||
[_result appendFormat:@"</%@>", element.tagName];
|
||||
}
|
||||
|
||||
- (void)serializeText:(HTMLText *)text
|
||||
{
|
||||
if ([text.parentElement.tagName isEqualToAny:@"style", @"script", @"xmp", @"iframe", @"noembed", @"noframes",
|
||||
@"plaintext", @"noscript", nil]) {
|
||||
[_result appendString:text.data];
|
||||
} else {
|
||||
NSMutableString *escaped = [text.data mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@"<" withString:@"<" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[escaped replaceOccurrencesOfString:@">" withString:@">" options:0 range:NSMakeRange(0, escaped.length)];
|
||||
[_result appendString:escaped];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)serializeComment:(HTMLComment *)comment
|
||||
{
|
||||
[_result appendFormat:@"<!--%@-->", comment.data];
|
||||
}
|
||||
|
||||
- (void)serializeDocumentType:(HTMLDocumentType *)doctype
|
||||
{
|
||||
[_result appendFormat:@"<!DOCTYPE %@>", doctype.name];
|
||||
}
|
||||
|
||||
@end
|
||||
+1
-19
@@ -8,7 +8,7 @@
|
||||
|
||||
#import "HTMLText.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
#import "HTMLCharacterData+Private.h"
|
||||
#import "HTMLKitDOMExceptions.h"
|
||||
#import "HTMLDocument+Private.h"
|
||||
@@ -66,24 +66,6 @@ NS_INLINE void CheckValidOffset(HTMLNode *node, NSUInteger offset, NSString *cmd
|
||||
return newNode;
|
||||
}
|
||||
|
||||
#pragma mark - Serialization
|
||||
|
||||
- (NSString *)outerHTML
|
||||
{
|
||||
if ([self.parentElement.tagName isEqualToAny:@"style", @"script", @"xmp", @"iframe", @"noembed", @"noframes",
|
||||
@"plaintext", @"noscript", nil]) {
|
||||
return self.data;
|
||||
} else {
|
||||
NSRange range = NSMakeRange(0, self.data.length);
|
||||
NSMutableString *escaped = [self.data mutableCopy];
|
||||
[escaped replaceOccurrencesOfString:@"&" withString:@"&" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"\00A0" withString:@" " options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@"<" withString:@"<" options:0 range:range];
|
||||
[escaped replaceOccurrencesOfString:@">" withString:@">" options:0 range:range];
|
||||
return escaped;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Description
|
||||
|
||||
- (NSString *)description
|
||||
|
||||
@@ -2413,6 +2413,7 @@
|
||||
usingComparator:^ NSComparisonResult (id obj1, id obj2) { return [obj1 compare:obj2]; }];
|
||||
|
||||
if (searchIndex >= entities.count || ![[entities objectAtIndex:searchIndex] hasPrefix:name]) {
|
||||
[name setString:[name substringToIndex:name.length -1]];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// HTMLTreeVisitor.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 30.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "HTMLTreeVisitor.h"
|
||||
#import "HTMLNode.h"
|
||||
#import "HTMLTreeWalker.h"
|
||||
|
||||
@interface HTMLTreeVisitor()
|
||||
{
|
||||
HTMLNode *_root;
|
||||
HTMLTreeWalker *_treeWalker;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation HTMLTreeVisitor
|
||||
|
||||
- (instancetype)initWithNode:(HTMLNode *)node
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_root = node;
|
||||
_treeWalker = [[HTMLTreeWalker alloc] initWithNode:node];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)walkWithNodeVisitor:(id<HTMLNodeVisitor>)visitor
|
||||
{
|
||||
HTMLNode *currentNode = _treeWalker.currentNode;
|
||||
while (currentNode) {
|
||||
[visitor enter:currentNode];
|
||||
if (currentNode.hasChildNodes) {
|
||||
currentNode = [_treeWalker firstChild];
|
||||
continue;
|
||||
}
|
||||
|
||||
HTMLNode *next = [_treeWalker nextSibling];
|
||||
if (next) {
|
||||
[visitor leave:currentNode];
|
||||
currentNode = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
while (!next && _treeWalker.currentNode != _root) {
|
||||
[visitor leave:_treeWalker.currentNode];
|
||||
currentNode = [_treeWalker parentNode];
|
||||
next = [_treeWalker nextSibling];
|
||||
}
|
||||
[visitor leave:currentNode];
|
||||
currentNode = _treeWalker.currentNode;
|
||||
|
||||
if (currentNode == _root) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@implementation NSCharacterSet (HTMLKit)
|
||||
|
||||
+ (instancetype)HTMLWhitespaceCharacterSet
|
||||
+ (instancetype)htmlkit_HTMLWhitespaceCharacterSet
|
||||
{
|
||||
static NSCharacterSet *set = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
@@ -20,7 +20,7 @@
|
||||
return set;
|
||||
}
|
||||
|
||||
+ (instancetype)HTMLHexNumberCharacterSet
|
||||
+ (instancetype)htmlkit_HTMLHexNumberCharacterSet
|
||||
{
|
||||
static NSCharacterSet *set = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
@@ -30,7 +30,7 @@
|
||||
return set;
|
||||
}
|
||||
|
||||
+ (instancetype)CSSNthExpressionCharacterSet
|
||||
+ (instancetype)htmlkit_CSSNthExpressionCharacterSet
|
||||
{
|
||||
static NSCharacterSet *set = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
|
||||
@@ -15,37 +15,12 @@ NS_INLINE BOOL isHtmlWhitespaceChar(unichar c)
|
||||
|
||||
@implementation NSString (HTMLKit)
|
||||
|
||||
- (BOOL)isEqualToStringIgnoringCase:(NSString *)aString
|
||||
- (BOOL)htmlkit_isHTMLWhitespaceString
|
||||
{
|
||||
return [self caseInsensitiveCompare:aString] == NSOrderedSame;
|
||||
return self.htmlkit_leadingHTMLWhitespaceLength == self.length;
|
||||
}
|
||||
|
||||
- (BOOL)isEqualToAny:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, first);
|
||||
for (NSString *next = first; next != nil; next = va_arg(list, NSString *)) {
|
||||
if ([self isEqualToString:next]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
va_end(list);
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)hasPrefixIgnoringCase:(NSString *)aString
|
||||
{
|
||||
NSRange reange = [self rangeOfString:aString
|
||||
options:NSAnchoredSearch|NSCaseInsensitiveSearch];
|
||||
return reange.location != NSNotFound;
|
||||
}
|
||||
|
||||
- (BOOL)isHTMLWhitespaceString
|
||||
{
|
||||
return self.leadingHTMLWhitespaceLength == self.length;
|
||||
}
|
||||
|
||||
- (NSUInteger)leadingHTMLWhitespaceLength
|
||||
- (NSUInteger)htmlkit_leadingHTMLWhitespaceLength
|
||||
{
|
||||
size_t idx = 0;
|
||||
NSUInteger length = self.length;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// NSString+Private.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.03.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+Private.h"
|
||||
|
||||
@implementation NSString (Private)
|
||||
|
||||
- (BOOL)isEqualToStringIgnoringCase:(NSString *)aString
|
||||
{
|
||||
return [self caseInsensitiveCompare:aString] == NSOrderedSame;
|
||||
}
|
||||
|
||||
- (BOOL)isEqualToAny:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, first);
|
||||
for (NSString *next = first; next != nil; next = va_arg(list, NSString *)) {
|
||||
if ([self isEqualToString:next]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
va_end(list);
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)hasPrefixIgnoringCase:(NSString *)aString
|
||||
{
|
||||
NSRange reange = [self rangeOfString:aString
|
||||
options:NSAnchoredSearch|NSCaseInsensitiveSearch];
|
||||
return reange.location != NSNotFound;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes and returns a CSS has-descendant selector, e.g. 'div:has(p)'
|
||||
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
|
||||
@param selector The selector matching a descendant element.
|
||||
@return A new instance of the has-descendant selector.
|
||||
|
||||
@@ -76,7 +76,7 @@ extern NSString * _Nonnull NSStringFromNthExpression(CSSNthExpression expression
|
||||
@param string The selector string which will be parsed.
|
||||
@return A new instance of a parsed CSS Selector, `nil` if the string is not a valid selector string.
|
||||
*/
|
||||
+ (nullable instancetype)selectorWithString:(NSString *)stirng;
|
||||
+ (nullable instancetype)selectorWithString:(NSString *)string;
|
||||
|
||||
/**
|
||||
Implementations should override this method to provide the selector-sprecific logic for matching elements.
|
||||
|
||||
@@ -225,7 +225,7 @@ extern CSSSelector * not(CSSSelector *selector);
|
||||
/**
|
||||
CSS has-descendant selector, e.g. 'div:has(p)'
|
||||
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
@discussion 'div:has(p)' matches all <div> elements which have a descendant <p> element.
|
||||
|
||||
@param selector The selector matching a descendant element.
|
||||
@return A has-descendant selector.
|
||||
|
||||
@@ -15,6 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface HTMLComment : HTMLCharacterData
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Initializes a new HTML comment node.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/**
|
||||
Initializes a new comment token.
|
||||
|
||||
@param string The string with which to initialize the token.
|
||||
@param data The string with which to initialize the token.
|
||||
@return A new instance of a comment token.
|
||||
*/
|
||||
- (instancetype)initWithData:(NSString *)data;
|
||||
|
||||
@@ -18,9 +18,12 @@
|
||||
#import "HTMLRange.h"
|
||||
#import "HTMLDOMTokenList.h"
|
||||
#import "HTMLNodeIterator.h"
|
||||
#import "HTMLTreeVisitor.h"
|
||||
#import "HTMLTreeWalker.h"
|
||||
#import "HTMLNodeFilter.h"
|
||||
|
||||
#import "HTMLKitDOMExceptions.h"
|
||||
#import "HTMLNamespaces.h"
|
||||
#import "HTMLQuirksMode.h"
|
||||
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
@@ -78,6 +78,11 @@ typedef NS_ENUM(short, HTMLDocumentReadyState)
|
||||
*/
|
||||
+ (instancetype)documentWithString:(NSString *)string;
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Adopts a given node into this document, i.e. the document becomes the new owner of the node. Raises a HTMLKitNotSupportedError
|
||||
exception if node is an instance of HTMLDocument.
|
||||
|
||||
@@ -18,6 +18,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface HTMLDocumentFragment : HTMLNode
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Initializes a new document fragment with the given document as owner.
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *systemIdentifier;
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Initializes and returns a new isntance of a Document Type node.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param tagName The tag name.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
- (instancetype)initWithTagName:(NSString *)tagName;
|
||||
@@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name and attributes.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param tagName The tag name.
|
||||
@param attributes The attributes.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
@@ -80,8 +80,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
Initializes a new HTML element with the given tag name, namespace, and attributes.
|
||||
|
||||
@param tagname The tag name.
|
||||
@param namespace The namespace.
|
||||
@param tagName The tag name.
|
||||
@param htmlNamespace The HTML namespace.
|
||||
@param attributes The attributes.
|
||||
@return A new HTML element.
|
||||
*/
|
||||
@@ -107,7 +107,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Set the value of the attribute with the given name.
|
||||
|
||||
@param value The value to set.
|
||||
@param name The attribute's name.
|
||||
@param attribute The attribute's name.
|
||||
*/
|
||||
- (void)setObject:(NSString *)value forKeyedSubscript:(NSString *)attribute;
|
||||
|
||||
|
||||
@@ -29,64 +29,66 @@ NS_INLINE void AdjustSVGAttributes(HTMLTagToken *token)
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *replacements = @{@"attributename": @"attributeName",
|
||||
@"attributetype": @"attributeType",
|
||||
@"basefrequency": @"baseFrequency",
|
||||
@"baseprofile": @"baseProfile",
|
||||
@"calcmode": @"calcMode",
|
||||
@"clippathunits": @"clipPathUnits",
|
||||
@"diffuseconstant": @"diffuseConstant",
|
||||
@"edgemode": @"edgeMode",
|
||||
@"filterunits": @"filterUnits",
|
||||
@"glyphref": @"glyphRef",
|
||||
@"gradienttransform": @"gradientTransform",
|
||||
@"gradientunits": @"gradientUnits",
|
||||
@"kernelmatrix": @"kernelMatrix",
|
||||
@"kernelunitlength": @"kernelUnitLength",
|
||||
@"keypoints": @"keyPoints",
|
||||
@"keysplines": @"keySplines",
|
||||
@"keytimes": @"keyTimes",
|
||||
@"lengthadjust": @"lengthAdjust",
|
||||
@"limitingconeangle": @"limitingConeAngle",
|
||||
@"markerheight": @"markerHeight",
|
||||
@"markerunits": @"markerUnits",
|
||||
@"markerwidth": @"markerWidth",
|
||||
@"maskcontentunits": @"maskContentUnits",
|
||||
@"maskunits": @"maskUnits",
|
||||
@"numoctaves": @"numOctaves",
|
||||
@"pathlength": @"pathLength",
|
||||
@"patterncontentunits": @"patternContentUnits",
|
||||
@"patterntransform": @"patternTransform",
|
||||
@"patternunits": @"patternUnits",
|
||||
@"pointsatx": @"pointsAtX",
|
||||
@"pointsaty": @"pointsAtY",
|
||||
@"pointsatz": @"pointsAtZ",
|
||||
@"preservealpha": @"preserveAlpha",
|
||||
@"preserveaspectratio": @"preserveAspectRatio",
|
||||
@"primitiveunits": @"primitiveUnits",
|
||||
@"refx": @"refX",
|
||||
@"refy": @"refY",
|
||||
@"repeatcount": @"repeatCount",
|
||||
@"repeatdur": @"repeatDur",
|
||||
@"requiredextensions": @"requiredExtensions",
|
||||
@"requiredfeatures": @"requiredFeatures",
|
||||
@"specularconstant": @"specularConstant",
|
||||
@"specularexponent": @"specularExponent",
|
||||
@"spreadmethod": @"spreadMethod",
|
||||
@"startoffset": @"startOffset",
|
||||
@"stddeviation": @"stdDeviation",
|
||||
@"stitchtiles": @"stitchTiles",
|
||||
@"surfacescale": @"surfaceScale",
|
||||
@"systemlanguage": @"systemLanguage",
|
||||
@"tablevalues": @"tableValues",
|
||||
@"targetx": @"targetX",
|
||||
@"targety": @"targetY",
|
||||
@"textlength": @"textLength",
|
||||
@"viewbox": @"viewBox",
|
||||
@"viewtarget": @"viewTarget",
|
||||
@"xchannelselector": @"xChannelSelector",
|
||||
@"ychannelselector": @"yChannelSelector",
|
||||
@"zoomandpan": @"zoomAndPan"};
|
||||
NSDictionary *replacements = @{
|
||||
@"attributename": @"attributeName",
|
||||
@"attributetype": @"attributeType",
|
||||
@"basefrequency": @"baseFrequency",
|
||||
@"baseprofile": @"baseProfile",
|
||||
@"calcmode": @"calcMode",
|
||||
@"clippathunits": @"clipPathUnits",
|
||||
@"diffuseconstant": @"diffuseConstant",
|
||||
@"edgemode": @"edgeMode",
|
||||
@"filterunits": @"filterUnits",
|
||||
@"glyphref": @"glyphRef",
|
||||
@"gradienttransform": @"gradientTransform",
|
||||
@"gradientunits": @"gradientUnits",
|
||||
@"kernelmatrix": @"kernelMatrix",
|
||||
@"kernelunitlength": @"kernelUnitLength",
|
||||
@"keypoints": @"keyPoints",
|
||||
@"keysplines": @"keySplines",
|
||||
@"keytimes": @"keyTimes",
|
||||
@"lengthadjust": @"lengthAdjust",
|
||||
@"limitingconeangle": @"limitingConeAngle",
|
||||
@"markerheight": @"markerHeight",
|
||||
@"markerunits": @"markerUnits",
|
||||
@"markerwidth": @"markerWidth",
|
||||
@"maskcontentunits": @"maskContentUnits",
|
||||
@"maskunits": @"maskUnits",
|
||||
@"numoctaves": @"numOctaves",
|
||||
@"pathlength": @"pathLength",
|
||||
@"patterncontentunits": @"patternContentUnits",
|
||||
@"patterntransform": @"patternTransform",
|
||||
@"patternunits": @"patternUnits",
|
||||
@"pointsatx": @"pointsAtX",
|
||||
@"pointsaty": @"pointsAtY",
|
||||
@"pointsatz": @"pointsAtZ",
|
||||
@"preservealpha": @"preserveAlpha",
|
||||
@"preserveaspectratio": @"preserveAspectRatio",
|
||||
@"primitiveunits": @"primitiveUnits",
|
||||
@"refx": @"refX",
|
||||
@"refy": @"refY",
|
||||
@"repeatcount": @"repeatCount",
|
||||
@"repeatdur": @"repeatDur",
|
||||
@"requiredextensions": @"requiredExtensions",
|
||||
@"requiredfeatures": @"requiredFeatures",
|
||||
@"specularconstant": @"specularConstant",
|
||||
@"specularexponent": @"specularExponent",
|
||||
@"spreadmethod": @"spreadMethod",
|
||||
@"startoffset": @"startOffset",
|
||||
@"stddeviation": @"stdDeviation",
|
||||
@"stitchtiles": @"stitchTiles",
|
||||
@"surfacescale": @"surfaceScale",
|
||||
@"systemlanguage": @"systemLanguage",
|
||||
@"tablevalues": @"tableValues",
|
||||
@"targetx": @"targetX",
|
||||
@"targety": @"targetY",
|
||||
@"textlength": @"textLength",
|
||||
@"viewbox": @"viewBox",
|
||||
@"viewtarget": @"viewTarget",
|
||||
@"xchannelselector": @"xChannelSelector",
|
||||
@"ychannelselector": @"yChannelSelector",
|
||||
@"zoomandpan": @"zoomAndPan"
|
||||
};
|
||||
|
||||
HTMLOrderedDictionary *adjusted = [HTMLOrderedDictionary new];
|
||||
for (id key in token.attributes) {
|
||||
@@ -99,72 +101,45 @@ NS_INLINE void AdjustSVGAttributes(HTMLTagToken *token)
|
||||
NS_INLINE void AdjustSVGNameCase(HTMLTagToken *token)
|
||||
{
|
||||
NSDictionary *replacements = @{
|
||||
@"altglyph": @"altGlyph",
|
||||
@"altglyphdef": @"altGlyphDef",
|
||||
@"altglyphitem": @"altGlyphItem",
|
||||
@"animatecolor": @"animateColor",
|
||||
@"animatemotion": @"animateMotion",
|
||||
@"animatetransform": @"animateTransform",
|
||||
@"clippath": @"clipPath",
|
||||
@"feblend": @"feBlend",
|
||||
@"fecolormatrix": @"feColorMatrix",
|
||||
@"fecomponenttransfer": @"feComponentTransfer",
|
||||
@"fecomposite": @"feComposite",
|
||||
@"feconvolvematrix": @"feConvolveMatrix",
|
||||
@"fediffuselighting": @"feDiffuseLighting",
|
||||
@"fedisplacementmap": @"feDisplacementMap",
|
||||
@"fedistantlight": @"feDistantLight",
|
||||
@"fedropshadow": @"feDropShadow",
|
||||
@"feflood": @"feFlood",
|
||||
@"fefunca": @"feFuncA",
|
||||
@"fefuncb": @"feFuncB",
|
||||
@"fefuncg": @"feFuncG",
|
||||
@"fefuncr": @"feFuncR",
|
||||
@"fegaussianblur": @"feGaussianBlur",
|
||||
@"feimage": @"feImage",
|
||||
@"femerge": @"feMerge",
|
||||
@"femergenode": @"feMergeNode",
|
||||
@"femorphology": @"feMorphology",
|
||||
@"feoffset": @"feOffset",
|
||||
@"fepointlight": @"fePointLight",
|
||||
@"fespecularlighting": @"feSpecularLighting",
|
||||
@"fespotlight": @"feSpotLight",
|
||||
@"fetile": @"feTile",
|
||||
@"feturbulence": @"feTurbulence",
|
||||
@"foreignobject": @"foreignObject",
|
||||
@"glyphref": @"glyphRef",
|
||||
@"lineargradient": @"linearGradient",
|
||||
@"radialgradient": @"radialGradient",
|
||||
@"textpath": @"textPath"};
|
||||
@"altglyph": @"altGlyph",
|
||||
@"altglyphdef": @"altGlyphDef",
|
||||
@"altglyphitem": @"altGlyphItem",
|
||||
@"animatecolor": @"animateColor",
|
||||
@"animatemotion": @"animateMotion",
|
||||
@"animatetransform": @"animateTransform",
|
||||
@"clippath": @"clipPath",
|
||||
@"feblend": @"feBlend",
|
||||
@"fecolormatrix": @"feColorMatrix",
|
||||
@"fecomponenttransfer": @"feComponentTransfer",
|
||||
@"fecomposite": @"feComposite",
|
||||
@"feconvolvematrix": @"feConvolveMatrix",
|
||||
@"fediffuselighting": @"feDiffuseLighting",
|
||||
@"fedisplacementmap": @"feDisplacementMap",
|
||||
@"fedistantlight": @"feDistantLight",
|
||||
@"fedropshadow": @"feDropShadow",
|
||||
@"feflood": @"feFlood",
|
||||
@"fefunca": @"feFuncA",
|
||||
@"fefuncb": @"feFuncB",
|
||||
@"fefuncg": @"feFuncG",
|
||||
@"fefuncr": @"feFuncR",
|
||||
@"fegaussianblur": @"feGaussianBlur",
|
||||
@"feimage": @"feImage",
|
||||
@"femerge": @"feMerge",
|
||||
@"femergenode": @"feMergeNode",
|
||||
@"femorphology": @"feMorphology",
|
||||
@"feoffset": @"feOffset",
|
||||
@"fepointlight": @"fePointLight",
|
||||
@"fespecularlighting": @"feSpecularLighting",
|
||||
@"fespotlight": @"feSpotLight",
|
||||
@"fetile": @"feTile",
|
||||
@"feturbulence": @"feTurbulence",
|
||||
@"foreignobject": @"foreignObject",
|
||||
@"glyphref": @"glyphRef",
|
||||
@"lineargradient": @"linearGradient",
|
||||
@"radialgradient": @"radialGradient",
|
||||
@"textpath": @"textPath"
|
||||
};
|
||||
|
||||
NSString *replacement = replacements[token.tagName] ?: token.tagName;
|
||||
token.tagName = replacement;
|
||||
}
|
||||
|
||||
NS_INLINE void AdjustForeignAttributes(HTMLTagToken *token)
|
||||
{
|
||||
if (token.attributes == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *replacements = @{ @"xlink:actuate": @"xlink actuate",
|
||||
@"xlink:arcrole": @"xlink arcrole",
|
||||
@"xlink:href": @"xlink href",
|
||||
@"xlink:role": @"xlink role",
|
||||
@"xlink:show": @"xlink show",
|
||||
@"xlink:title": @"xlink title",
|
||||
@"xlink:type": @"xlink type",
|
||||
@"xml:base": @"xml base",
|
||||
@"xml:lang": @"xml lang",
|
||||
@"xml:space": @"xml space",
|
||||
@"xmlns": @"xmlns",
|
||||
@"xmlns:xlink": @"xmlns xlink"};
|
||||
|
||||
HTMLOrderedDictionary *adjusted = [HTMLOrderedDictionary new];
|
||||
for (id key in token.attributes) {
|
||||
NSString *replacement = replacements[key] ?: key;
|
||||
adjusted[replacement] = token.attributes[key];
|
||||
}
|
||||
token.attributes = adjusted;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import "HTMLNode+Private.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "HTMLNamespaces.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
#import "NSString+Private.h"
|
||||
|
||||
NS_INLINE BOOL IsNodeMathMLTextIntegrationPoint(HTMLElement *node)
|
||||
{
|
||||
@@ -52,3 +53,14 @@ NS_INLINE BOOL IsSpecialElement(HTMLElement *element)
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
NS_INLINE BOOL DoesNodeSerializeAsVoid(HTMLNode *node)
|
||||
{
|
||||
if (node.nodeType != HTMLNodeElement) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return [node.asElement.tagName isEqualToAny:@"area", @"base", @"basefont", @"bgsound", @"br", @"col", @"embed",
|
||||
@"frame", @"hr", @"img", @"input", @"keygen", @"link", @"meta", @"param", @"source", @"track", @"wbr", nil];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
/**
|
||||
Typedef for the error callback block.
|
||||
|
||||
@param reason The string describing the reason of the reported error.
|
||||
@param code The standarized error-code
|
||||
@param details The string describing the reason of the reported error.
|
||||
*/
|
||||
typedef void (^ HTMLStreamReaderErrorCallback)(NSString *code, NSString *details);
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ extern const unsigned char HTMLKitVersionString[];
|
||||
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLParser.h"
|
||||
#import "HTMLSerializer.h"
|
||||
#import "HTMLKitErrorDomain.h"
|
||||
#import "HTMLOrderedDictionary.h"
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
|
||||
#import "HTMLNode.h"
|
||||
|
||||
@class HTMLText;
|
||||
@class HTMLComment;
|
||||
@class HTMLDocumentType;
|
||||
|
||||
/**
|
||||
Private HTML Node methods which are not intended for public API.
|
||||
*/
|
||||
@@ -44,6 +48,21 @@
|
||||
*/
|
||||
- (HTMLElement *)asElement;
|
||||
|
||||
/**
|
||||
Casts this node to a HTML Text. This cast should only be performed after the appropriate check.
|
||||
*/
|
||||
- (HTMLText *)asText;
|
||||
|
||||
/**
|
||||
Casts this node to a HTML Comment. This cast should only be performed after the appropriate check.
|
||||
*/
|
||||
- (HTMLComment *)asComment;
|
||||
|
||||
/**
|
||||
Casts this node to a HTML Document Type. This cast should only be performed after the appropriate check.
|
||||
*/
|
||||
- (HTMLDocumentType *)asDocumentType;
|
||||
|
||||
/**
|
||||
Returns the same string representation of the DOM tree rooted at this node that is used by html5lib-tests.
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLNodeIterator.h"
|
||||
#import "HTMLTreeVisitor.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -232,7 +233,7 @@ typedef NS_OPTIONS(unsigned short, HTMLDocumentPosition)
|
||||
/**
|
||||
Returns the index of the given child element in the set of child nodes.
|
||||
|
||||
@param node The element.
|
||||
@param element The element.
|
||||
@return The index of the given element in the children set.
|
||||
*/
|
||||
- (NSUInteger)indexOfChildElement:(HTMLElement *)element;
|
||||
@@ -248,7 +249,7 @@ typedef NS_OPTIONS(unsigned short, HTMLDocumentPosition)
|
||||
/**
|
||||
Prepends the given array of nodes to the set of child nodes.
|
||||
|
||||
@param node The nodes to prepend.
|
||||
@param nodes The nodes to prepend.
|
||||
*/
|
||||
- (void)prependNodes:(NSArray<HTMLNode *> *)nodes;
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// HTMLNodeVisitor.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 30.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class HTMLNode;
|
||||
|
||||
#pragma mark - Node Visitor
|
||||
|
||||
/**
|
||||
A HTML Node Visitor which can be used with a tree visitor.
|
||||
|
||||
@see HTMLTreeVisitor
|
||||
*/
|
||||
@protocol HTMLNodeVisitor <NSObject>
|
||||
@required
|
||||
|
||||
/**
|
||||
Called when visiting the node for the first time
|
||||
|
||||
@param node The node that is beaing visited for the first time.
|
||||
*/
|
||||
- (void)enter:(HTMLNode *)node;
|
||||
|
||||
/**
|
||||
Called when leaving a previously entered node, i.e. when all its child nodes are visited.
|
||||
|
||||
@param node The node that beaing leaved.
|
||||
*/
|
||||
- (void)leave:(HTMLNode *)node;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Block Node Visitor
|
||||
|
||||
/**
|
||||
A concrete block-based HTML Node Visitor implementation.
|
||||
*/
|
||||
@interface HTMLNodeVisitorBlock : NSObject <HTMLNodeVisitor>
|
||||
|
||||
/**
|
||||
Initializes and returns a new instance of this visitor.
|
||||
|
||||
@param enterBlock The block to apply on entering a visited node.
|
||||
@param leaveBlock The block to apply on leaving a visited node.
|
||||
*/
|
||||
+ (instancetype)visitorWithEnterBlock:(void (^)(HTMLNode *node))enterBlock
|
||||
leaveBlock:(void (^)(HTMLNode *node))leaveBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -6,8 +6,6 @@
|
||||
// Copyright (c) 2015 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+HTMLKit.h"
|
||||
|
||||
/**
|
||||
HTML quirks modes
|
||||
https://html.spec.whatwg.org/multipage/infrastructure.html#quirks-mode
|
||||
@@ -82,12 +80,4 @@ static NSString * HTMLQuirksModePrefixes[] = {
|
||||
#undef QUIRKS_ENTRY
|
||||
};
|
||||
|
||||
NS_INLINE BOOL QuirksModePrefixMatch(NSString *publicIdentifier)
|
||||
{
|
||||
for (int i = 0; i < sizeof(HTMLQuirksModePrefixes) / sizeof(HTMLQuirksModePrefixes[0]); i++) {
|
||||
if ([publicIdentifier hasPrefixIgnoringCase:HTMLQuirksModePrefixes[i]]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
extern BOOL QuirksModePrefixMatch(NSString *publicIdentifier);
|
||||
|
||||
@@ -113,16 +113,16 @@ typedef NS_ENUM(unsigned short, HTMLRangeComparisonMethod)
|
||||
/**
|
||||
Sets the start boundary.
|
||||
|
||||
@param startNode The new node of the start boundary.
|
||||
@param startOffset The new offset of the start boundary.
|
||||
@param node The new node of the start boundary.
|
||||
@param offset The new offset of the start boundary.
|
||||
*/
|
||||
- (void)setStartNode:(HTMLNode *)node startOffset:(NSUInteger)offset;
|
||||
|
||||
/**
|
||||
Sets the end boundary.
|
||||
|
||||
@param startNode The new node of the end boundary.
|
||||
@param startOffset The new offset of the end boundary.
|
||||
@param node The new node of the end boundary.
|
||||
@param offset The new offset of the end boundary.
|
||||
*/
|
||||
- (void)setEndNode:(HTMLNode *)node endOffset:(NSUInteger)offset;
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// HTMLSerializer.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 28.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class HTMLNode;
|
||||
|
||||
/**
|
||||
The scope for HTML Serialization.
|
||||
*/
|
||||
typedef NS_ENUM(unsigned short, HTMLSerializationScope)
|
||||
{
|
||||
HTMLSerializationScopeIncludeRoot = 1,
|
||||
HTMLSerializationScopeChildrenOnly = 2
|
||||
};
|
||||
|
||||
/**
|
||||
A HTML DOM Serializer. Used to serialize HTML Tree rooted at a given node with the desired scope:
|
||||
|
||||
- IncludeRoot scope includes the given node into the serialized result, e.g. HTML Node's `outerHTML`
|
||||
- ChildrenOnly scope serializes only the child nodes of the given node, e.g. HTML Node's `innerHTML`
|
||||
|
||||
https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments
|
||||
*/
|
||||
@interface HTMLSerializer : NSObject
|
||||
|
||||
/**
|
||||
Serializes the given node with the given scope.
|
||||
|
||||
@param node The root node of the tree to serialize
|
||||
@param scope The scope for serialization
|
||||
*/
|
||||
+ (NSString *)serializeNode:(HTMLNode *)node scope:(HTMLSerializationScope)scope;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
/**
|
||||
Checks whether an element with the given tag name is in the stack.
|
||||
|
||||
@param tagname The element's tag name.
|
||||
@param tagName The element's tag name.
|
||||
@return `YES` if such an element is in the stack, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)containsElementWithTagName:(NSString *)tagName;
|
||||
|
||||
@@ -18,6 +18,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface HTMLTemplate : HTMLElement
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
The content of the template.
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface HTMLText : HTMLCharacterData
|
||||
|
||||
/**
|
||||
Decalration override for `NS_UNAVAILABLE` declared in `HTMLNode`
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Initializes a new HTML text node.
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// HTMLTreeVisitor.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 30.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "HTMLNodeVisitor.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class HTMLNode;
|
||||
|
||||
/**
|
||||
A HTML Tree Visitor that walks the DOM in tree order. Nodes are visited exacly once
|
||||
|
||||
The provided node visitor is called for each node twice, once when entering the node,
|
||||
and once again when leaving the node.
|
||||
|
||||
@see HTMLNodeVisitor
|
||||
*/
|
||||
@interface HTMLTreeVisitor : NSObject
|
||||
|
||||
/**
|
||||
Initializes a new tree visitor with.
|
||||
|
||||
@param node The root node.
|
||||
|
||||
@return A new instance of a tree visitor.
|
||||
*/
|
||||
- (instancetype)initWithNode:(HTMLNode *)node;
|
||||
|
||||
/**
|
||||
Walks the DOM tree rooted at the provided node with the given node visitor.
|
||||
|
||||
@param visitor A HTMLNodeVisitor implementation.
|
||||
*/
|
||||
- (void)walkWithNodeVisitor:(id<HTMLNodeVisitor>)visitor;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
Initializes a new tree walker with no filter and HTMLNodeFilterShowAll show options.
|
||||
|
||||
@param node The root node.
|
||||
@param filter The node filter to use.
|
||||
@return A new instance of a tree walker.
|
||||
*/
|
||||
- (instancetype)initWithNode:(HTMLNode *)node;
|
||||
|
||||
@@ -19,17 +19,18 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
A character set for HTML whitespace characters: CHARACTER TABULATION U+0009, LINE FEED U+000A, FORM FEED U+000C,
|
||||
CARRIAGE RETURN U+000D, and SPACE U+0020.
|
||||
*/
|
||||
+ (instancetype)HTMLWhitespaceCharacterSet;
|
||||
|
||||
+ (instancetype)htmlkit_HTMLWhitespaceCharacterSet;
|
||||
|
||||
/**
|
||||
A character set for HTML HEX-Number characters: The digits 0-9, latin small letters a-f, and latin capital letters A-F.
|
||||
*/
|
||||
+ (instancetype)HTMLHexNumberCharacterSet;
|
||||
+ (instancetype)htmlkit_HTMLHexNumberCharacterSet;
|
||||
|
||||
/**
|
||||
A character set for CSS Nth-Expression: The digits 0-9, space, latin small n, latin capital N, plus sing and minus sign.
|
||||
*/
|
||||
+ (instancetype)CSSNthExpressionCharacterSet;
|
||||
+ (instancetype)htmlkit_CSSNthExpressionCharacterSet;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -15,38 +15,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface NSString (HTMLKit)
|
||||
|
||||
/**
|
||||
Checks whether this string is equal to another ignoring the case.
|
||||
|
||||
@return `YES` if the two string are equal ignroing the case, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isEqualToStringIgnoringCase:(NSString *)aString;
|
||||
|
||||
/**
|
||||
Checks whether this string is equal to any of the given strings.
|
||||
|
||||
@return `YES` if there is an equal string, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isEqualToAny:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION;
|
||||
|
||||
/**
|
||||
Checks whether this string has a prefix ignoring the case.
|
||||
|
||||
@return `YES` if this string has a given prefix ignroing the case, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)hasPrefixIgnoringCase:(NSString *)aString;
|
||||
|
||||
/**
|
||||
Checks whether this string is a HTML whitespace string.
|
||||
|
||||
@return `YES` if this string is a HTML whitespace string, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isHTMLWhitespaceString;
|
||||
- (BOOL)htmlkit_isHTMLWhitespaceString;
|
||||
|
||||
/**
|
||||
@return The length of the leading HTML whitespace characters in this string.
|
||||
*/
|
||||
- (NSUInteger)leadingHTMLWhitespaceLength;
|
||||
- (NSUInteger)htmlkit_leadingHTMLWhitespaceLength;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// NSString+Private.h
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 26.03.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
///------------------------------------------------------
|
||||
/// HTMLKit private header
|
||||
///------------------------------------------------------
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
NSStirng category for common helper methods.
|
||||
*/
|
||||
@interface NSString (Private)
|
||||
|
||||
/**
|
||||
Checks whether this string is equal to another ignoring the case.
|
||||
|
||||
@return `YES` if the two string are equal ignroing the case, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isEqualToStringIgnoringCase:(NSString *)aString;
|
||||
|
||||
/**
|
||||
Checks whether this string is equal to any of the given strings.
|
||||
|
||||
@return `YES` if there is an equal string, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)isEqualToAny:(NSString *)first, ... NS_REQUIRES_NIL_TERMINATION;
|
||||
|
||||
/**
|
||||
Checks whether this string has a prefix ignoring the case.
|
||||
|
||||
@return `YES` if this string has a given prefix ignroing the case, `NO` otherwise.
|
||||
*/
|
||||
- (BOOL)hasPrefixIgnoringCase:(NSString *)aString;
|
||||
|
||||
@end
|
||||
@@ -34,5 +34,6 @@ module HTMLKit {
|
||||
header "HTMLParser+Private.h"
|
||||
header "HTMLNodeTraversal.h"
|
||||
header "HTMLDOMUtils.h"
|
||||
header "NSString+Private.h"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// CSSStructuralPseudoSelectors.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 18.04.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "CSSSelectors.h"
|
||||
#import "HTMLParser.h"
|
||||
#import "HTMLDOM.h"
|
||||
|
||||
@interface CSSStructuralPseudoSelectors : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation CSSStructuralPseudoSelectors
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_25
|
||||
{
|
||||
NSString *html = @"<table><tr><td>TD #0</td><td>TD #1</td><td>TD #2</td><td>TD #3</td></tr></table>";
|
||||
HTMLDocument *doc = [HTMLDocument documentWithString:html];
|
||||
NSArray<HTMLElement *> *elements = [doc querySelectorAll:@"td:gt(0)"];
|
||||
|
||||
XCTAssertEqual(elements.count, 3);
|
||||
XCTAssertEqualObjects(elements[0].textContent, @"TD #1");
|
||||
XCTAssertEqualObjects(elements[1].textContent, @"TD #2");
|
||||
XCTAssertEqualObjects(elements[2].textContent, @"TD #3");
|
||||
|
||||
elements = [doc querySelectorAll:@"td:lt(0)"];
|
||||
XCTAssertEqual(elements.count, 0);
|
||||
|
||||
elements = [doc querySelectorAll:@"td:eq(0)"];
|
||||
XCTAssertEqual(elements.count, 1);
|
||||
XCTAssertEqualObjects(elements[0].textContent, @"TD #0");
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "HTML5LibTreeConstructionTest.h"
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLDocumentType.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "HTMLText.h"
|
||||
@@ -289,6 +290,8 @@ NS_INLINE NSArray * parseAttribute(NSString *str)
|
||||
NSRange range = [str rangeOfString:@"=" options:0];
|
||||
|
||||
NSString *key = [str substringToIndex:range.location];
|
||||
key = [key stringByReplacingOccurrencesOfString:@" " withString:@":"];
|
||||
|
||||
NSString *value = [str substringFromIndex:range.location + 2];
|
||||
value = [value substringToIndex:value.length - 1];
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// HTMLKitParserTests.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 16.07.18.
|
||||
// Copyright © 2018 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "HTMLDOM.h"
|
||||
|
||||
@interface HTMLKitParserIssuesTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation HTMLKitParserIssuesTests
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_30 {
|
||||
NSString *html =
|
||||
@"<body>"
|
||||
" <svg id='draw_area' width='600' height='800' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"
|
||||
" <image id='overlay_img' xlink:href='foo.png' width='600' height='800'/>"
|
||||
" </svg>"
|
||||
"</body>";
|
||||
|
||||
HTMLDocument* document = [HTMLDocument documentWithString:html];
|
||||
HTMLElement *svg = [document querySelector:@"#draw_area"];
|
||||
|
||||
XCTAssertNil(svg.attributes[@"xlink"]);
|
||||
XCTAssertEqualObjects(svg.attributes[@"xmlns"], @"http://www.w3.org/2000/svg");
|
||||
XCTAssertEqualObjects(svg.attributes[@"xmlns:xlink"], @"http://www.w3.org/1999/xlink");
|
||||
|
||||
HTMLElement *image = [document querySelector:@"#overlay_img"];
|
||||
|
||||
XCTAssertNil(image.attributes[@"xlink"]);
|
||||
XCTAssertNil(image.attributes[@"href"]);
|
||||
XCTAssertEqualObjects(image.attributes[@"xlink:href"], @"foo.png");
|
||||
XCTAssertEqualObjects(image.outerHTML, @"<image id=\"overlay_img\" xlink:href=\"foo.png\" width=\"600\" height=\"800\"></image>");
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -51,7 +51,7 @@
|
||||
[_cases addObject:_currentCase];
|
||||
}
|
||||
|
||||
- (void)testCase:(XCTestCase *)testCase didFailWithDescription:(NSString *)description inFile:(NSString *)filePath atLine:(NSUInteger)lineNumber
|
||||
- (void)testCase:(XCTestCase *)testCase didRecordIssue:(XCTIssue *)issue
|
||||
{
|
||||
_currentCase[@"status"] = @"Failed";
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.braincookie.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>dev.iabudiab.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
||||
@@ -28,7 +28,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
parent = [HTMLDocumentFragment new];
|
||||
XCTAssertNoThrow([parent appendNode:element]);
|
||||
|
||||
parent = [HTMLElement new];
|
||||
parent = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
XCTAssertNoThrow([parent appendNode:element]);
|
||||
|
||||
parent = [HTMLTemplate new];
|
||||
@@ -54,7 +54,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
parent = [HTMLDocumentFragment new];
|
||||
XCTAssertNoThrow([parent insertNode:element beforeChildNode:nil]);
|
||||
|
||||
parent = [HTMLElement new];
|
||||
parent = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
XCTAssertNoThrow([parent insertNode:element beforeChildNode:nil]);
|
||||
|
||||
parent = [HTMLTemplate new];
|
||||
@@ -115,9 +115,9 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
|
||||
XCTAssertNoThrow([document appendNode:[HTMLDocumentFragment new]]);
|
||||
XCTAssertNoThrow([document appendNode:[HTMLDocumentType new]]);
|
||||
XCTAssertNoThrow([document appendNode:[HTMLElement new]]);
|
||||
XCTAssertNoThrow([document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]]);
|
||||
|
||||
HTMLElement *element = [HTMLElement new];
|
||||
HTMLElement *element = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
|
||||
XCTAssertNoThrow([element appendNode:[HTMLTemplate new]]);
|
||||
XCTAssertNoThrow([element appendNode:[HTMLComment new]]);
|
||||
@@ -132,7 +132,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
|
||||
XCTAssertThrows([[HTMLDocumentFragment new] appendNode:doctype]);
|
||||
XCTAssertThrows([[HTMLDocumentType new] appendNode:doctype]);
|
||||
XCTAssertThrows([[HTMLElement new] appendNode:doctype]);
|
||||
XCTAssertThrows([[[HTMLElement alloc] initWithTagName:@"div"] appendNode:doctype]);
|
||||
XCTAssertThrows([[HTMLTemplate new] appendNode:doctype]);
|
||||
XCTAssertThrows([[HTMLComment new] appendNode:doctype]);
|
||||
XCTAssertThrows([[HTMLText new] appendNode:doctype]);
|
||||
@@ -148,7 +148,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
XCTAssertThrows([[HTMLText new] appendNode:text]);
|
||||
|
||||
XCTAssertNoThrow([[HTMLDocumentFragment new] appendNode:text]);
|
||||
XCTAssertNoThrow([[HTMLElement new] appendNode:text]);
|
||||
XCTAssertNoThrow([[[HTMLElement alloc] initWithTagName:@"div"] appendNode:text]);
|
||||
XCTAssertNoThrow([[HTMLTemplate new] appendNode:text]);
|
||||
}
|
||||
|
||||
@@ -172,8 +172,8 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* Fragment has more than one Element child
|
||||
*/
|
||||
reset();
|
||||
[fragment appendNode:[HTMLElement new]];
|
||||
[fragment appendNode:[HTMLElement new]];
|
||||
[fragment appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[fragment appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document appendNode:fragment]);
|
||||
|
||||
|
||||
@@ -182,8 +182,8 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* Document has an Element child
|
||||
*/
|
||||
reset();
|
||||
[fragment appendNode:[HTMLElement new]];
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[fragment appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document appendNode:fragment]);
|
||||
|
||||
/**
|
||||
@@ -192,7 +192,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
*/
|
||||
reset();
|
||||
HTMLDocumentType *doctype = [HTMLDocumentType new];
|
||||
[fragment appendNode:[HTMLElement new]];
|
||||
[fragment appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:doctype];
|
||||
XCTAssertThrows([document insertNode:fragment beforeChildNode:doctype]);
|
||||
|
||||
@@ -202,7 +202,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
*/
|
||||
reset();
|
||||
HTMLComment *doctypePreviousSibling = [HTMLComment new];
|
||||
[fragment appendNode:[HTMLElement new]];
|
||||
[fragment appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:doctypePreviousSibling];
|
||||
[document appendNode:doctype];
|
||||
XCTAssertThrows([document insertNode:fragment beforeChildNode:doctypePreviousSibling]);
|
||||
@@ -211,7 +211,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
- (void)testValidElementInsertionIntoDocument
|
||||
{
|
||||
HTMLDocument *document = [HTMLDocument new];
|
||||
HTMLElement *element = [HTMLElement new];
|
||||
HTMLElement *element = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
|
||||
void (^ reset)(void) = ^ {
|
||||
[element removeAllChildNodes];
|
||||
@@ -221,7 +221,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
/**
|
||||
* Document has an Element child
|
||||
*/
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document appendNode:element]);
|
||||
|
||||
/**
|
||||
@@ -262,7 +262,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
*/
|
||||
reset();
|
||||
HTMLComment *secondChild = [HTMLComment new];
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:secondChild];
|
||||
XCTAssertThrows([document insertNode:doctype beforeChildNode:secondChild]);
|
||||
|
||||
@@ -270,7 +270,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* Document has an Element child
|
||||
*/
|
||||
reset();
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document appendNode:doctype]);
|
||||
}
|
||||
|
||||
@@ -296,8 +296,8 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* Replacement Fragment has more than one Element child
|
||||
*/
|
||||
reset();
|
||||
[replacement appendNode:[HTMLElement new]];
|
||||
[replacement appendNode:[HTMLElement new]];
|
||||
[replacement appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[replacement appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document replaceChildNode:child withNode:replacement]);
|
||||
|
||||
/**
|
||||
@@ -305,8 +305,8 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* Document has an Element child that is not the Replacement
|
||||
*/
|
||||
reset();
|
||||
[replacement appendNode:[HTMLElement new]];
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[replacement appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document replaceChildNode:child withNode:replacement]);
|
||||
|
||||
/**
|
||||
@@ -315,7 +315,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
*/
|
||||
reset();
|
||||
HTMLDocumentType *doctype = [HTMLDocumentType new];
|
||||
[replacement appendNode:[HTMLElement new]];
|
||||
[replacement appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
[document appendNode:doctype];
|
||||
XCTAssertThrows([document replaceChildNode:child withNode:replacement]);
|
||||
}
|
||||
@@ -324,7 +324,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
{
|
||||
HTMLDocument *document = [HTMLDocument new];
|
||||
HTMLComment *child = [HTMLComment new];
|
||||
HTMLElement *replacement = [HTMLElement new];
|
||||
HTMLElement *replacement = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
|
||||
void (^ reset)(void) = ^ {
|
||||
[replacement removeAllChildNodes];
|
||||
@@ -335,7 +335,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
/**
|
||||
* Docment has an Element child that is not replacement
|
||||
*/
|
||||
[document appendNode:[HTMLElement new]];
|
||||
[document appendNode:[[HTMLElement alloc] initWithTagName:@"div"]];
|
||||
XCTAssertThrows([document replaceChildNode:child withNode:replacement]);
|
||||
|
||||
/**
|
||||
@@ -369,7 +369,7 @@ extern uint64_t dispatch_benchmark(size_t count, void (^block)(void));
|
||||
* An Element is preceding the child node
|
||||
*/
|
||||
reset();
|
||||
[document insertNode:[HTMLElement new] beforeChildNode:child];
|
||||
[document insertNode:[[HTMLElement alloc] initWithTagName:@"div"] beforeChildNode:child];
|
||||
XCTAssertThrows([document replaceChildNode:child withNode:replacement]);
|
||||
}
|
||||
|
||||
|
||||
@@ -580,16 +580,49 @@ static HTMLNode * (^ LastDescendant)(HTMLNode *) = ^ HTMLNode * (HTMLNode *node)
|
||||
XCTAssertNotNil(body);
|
||||
|
||||
// iterator should be deallocated and detached at this point
|
||||
XCTAssertEqual(0, nodeIterators.count);
|
||||
XCTAssertEqual(0, nodeIterators.allObjects.count);
|
||||
|
||||
// iterator should be autoreleased, deallocated and detached after autoreleasepool
|
||||
@autoreleasepool {
|
||||
HTMLNodeIterator *iterator = [[HTMLNodeIterator alloc] initWithNode:body];
|
||||
[iterator nextNode];
|
||||
XCTAssertEqual(1, nodeIterators.count);
|
||||
XCTAssertEqual(1, nodeIterators.allObjects.count);
|
||||
}
|
||||
|
||||
XCTAssertEqual(0, nodeIterators.count);
|
||||
XCTAssertEqual(0, nodeIterators.allObjects.count);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_22
|
||||
{
|
||||
// The issue is applicable only for devices. On simulator the test is passed.
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:@"<div id=\"id\"></div>"];
|
||||
|
||||
NSString *divId = @"id";
|
||||
HTMLNodeFilterBlock *filter = [HTMLNodeFilterBlock filterWithBlock:^HTMLNodeFilterValue(HTMLNode * _Nonnull node) {
|
||||
HTMLElement *element = (HTMLElement *)node;
|
||||
return [element.elementId isEqualToString:divId] ? HTMLNodeFilterAccept : HTMLNodeFilterSkip;
|
||||
}];
|
||||
|
||||
HTMLNodeIterator *iterator = [document nodeIteratorWithShowOptions:HTMLNodeFilterShowElement filter:filter];
|
||||
|
||||
HTMLElement *element = (HTMLElement*)iterator.nextObject;
|
||||
XCTAssertTrue([element.elementId isEqualToString:divId]);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_28
|
||||
{
|
||||
HTMLDocument *document = self.document;
|
||||
HTMLNodeIterator *iterator = document.body.nodeIterator;
|
||||
|
||||
[iterator nextNode]; // Reference node: <body>
|
||||
|
||||
HTMLElement *span = (HTMLElement*)iterator.nextNode; // <span>
|
||||
NSString *spanTag = @"span";
|
||||
XCTAssertTrue([span.tagName isEqualToString:spanTag]);
|
||||
|
||||
HTMLElement *paragraph = span.nextSiblingElement; // <p>
|
||||
NSString *paragraphTag = @"p";
|
||||
XCTAssertTrue([paragraph.tagName isEqualToString:paragraphTag]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
XCTAssertEqual(element.childNodesCount, 1);
|
||||
XCTAssertEqual(element.firstChild, comment);
|
||||
|
||||
HTMLElement *firstElement = [HTMLElement new];
|
||||
HTMLElement *secondElement = [HTMLElement new];
|
||||
HTMLElement *firstElement = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
HTMLElement *secondElement = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
NSArray *nodes = @[firstElement, secondElement];
|
||||
|
||||
[element appendNodes:nodes];
|
||||
@@ -76,8 +76,8 @@
|
||||
XCTAssertEqual(element.childNodesCount, 2);
|
||||
XCTAssertEqual(element.firstChild, comment);
|
||||
|
||||
HTMLElement *firstElement = [HTMLElement new];
|
||||
HTMLElement *secondElement = [HTMLElement new];
|
||||
HTMLElement *firstElement = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
HTMLElement *secondElement = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
NSArray *nodes = @[firstElement, secondElement];
|
||||
|
||||
[element prependNodes:nodes];
|
||||
@@ -94,8 +94,8 @@
|
||||
[element appendNode:comment];
|
||||
|
||||
HTMLDocumentFragment *fragment = [HTMLDocumentFragment new];
|
||||
HTMLElement *firstChild = [HTMLElement new];
|
||||
HTMLElement *secondChild = [HTMLElement new];
|
||||
HTMLElement *firstChild = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
HTMLElement *secondChild = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
[fragment appendNode:firstChild];
|
||||
[fragment appendNode:secondChild];
|
||||
|
||||
@@ -494,10 +494,8 @@
|
||||
|
||||
XCTAssertTrue([paragraph compareDocumentPositionWithNode:paragraph] == HTMLDocumentPositionEquivalent);
|
||||
|
||||
HTMLElement *element = [HTMLElement new];
|
||||
XCTAssertTrue([paragraph compareDocumentPositionWithNode:element] ==
|
||||
(HTMLDocumentPositionDisconnected | HTMLDocumentPositionImplementationSpecific |
|
||||
paragraph.hash < element.hash ? HTMLDocumentPositionPreceding: HTMLDocumentPositionFollowing));
|
||||
HTMLElement *element = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
XCTAssertTrue([paragraph compareDocumentPositionWithNode:element] == HTMLDocumentPositionPreceding);
|
||||
|
||||
XCTAssertTrue([paragraph compareDocumentPositionWithNode:image] == HTMLDocumentPositionPreceding);
|
||||
XCTAssertTrue([anchor compareDocumentPositionWithNode:image] == HTMLDocumentPositionPreceding);
|
||||
@@ -512,4 +510,60 @@
|
||||
XCTAssertTrue([image compareDocumentPositionWithNode:outerDiv] == (HTMLDocumentPositionContainedBy | HTMLDocumentPositionFollowing));
|
||||
}
|
||||
|
||||
- (void)testDeepCloneElement {
|
||||
HTMLElement *outer = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"outer",
|
||||
@"class": @"green"}];
|
||||
|
||||
HTMLElement *innerLevel1 = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"inner1",
|
||||
@"class": @"red"}];
|
||||
|
||||
HTMLElement *innerLevel2 = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"inner2",
|
||||
@"class": @"red"}];
|
||||
|
||||
[outer appendNode:innerLevel1];
|
||||
[innerLevel1 appendNode:innerLevel2];
|
||||
|
||||
HTMLElement *clone = [outer cloneNodeDeep:YES];
|
||||
|
||||
XCTAssertNotEqual(clone, outer);
|
||||
XCTAssertEqualObjects(clone.elementId, outer.elementId);
|
||||
XCTAssertEqualObjects(clone.attributes, outer.attributes);
|
||||
|
||||
XCTAssertNotEqual(clone.firstChild, innerLevel1);
|
||||
XCTAssertEqualObjects(clone.firstChild.asElement.elementId, innerLevel1.elementId);
|
||||
XCTAssertEqualObjects(clone.firstChild.asElement.attributes, innerLevel1.attributes);
|
||||
|
||||
XCTAssertNotEqual(clone.firstChild, innerLevel2);
|
||||
XCTAssertEqualObjects(clone.firstChild.firstChild.asElement.elementId, innerLevel2.elementId);
|
||||
XCTAssertEqualObjects(clone.firstChild.firstChild.asElement.attributes, innerLevel2.attributes);
|
||||
}
|
||||
|
||||
- (void)testDeepCloneElementAttributes {
|
||||
HTMLElement *div = [[HTMLElement alloc] initWithTagName:@"div"
|
||||
attributes:@{@"id": @"outer",
|
||||
@"class": @"green",
|
||||
@"data": @"test"}];
|
||||
|
||||
HTMLElement *clone = [div cloneNodeDeep:YES];
|
||||
|
||||
XCTAssertEqualObjects(clone.attributes, div.attributes);
|
||||
XCTAssertTrue([clone.attributes isKindOfClass:[HTMLOrderedDictionary class]]);
|
||||
}
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_20 {
|
||||
HTMLElement *element = [[HTMLElement alloc] initWithTagName:@"div"];
|
||||
element.elementId = @"originalId";
|
||||
|
||||
HTMLElement *clone = [element cloneNodeDeep:YES];
|
||||
NSString *cloneId = @"cloneId";
|
||||
clone.elementId = cloneId;
|
||||
|
||||
XCTAssertTrue([clone.elementId isEqualToString:cloneId]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
{
|
||||
HTMLRange *range = [[HTMLRange alloc] initWithDocument:_document];
|
||||
|
||||
XCTAssertThrows([range setStartNode:[HTMLElement new] startOffset:0], @"Cannot set boundary to a node outside of the range's document");
|
||||
XCTAssertThrows([range setStartNode:[[HTMLElement alloc] initWithTagName:@"div"] startOffset:0], @"Cannot set boundary to a node outside of the range's document");
|
||||
XCTAssertThrows([range setStartNode:[HTMLDocumentType new] startOffset:0], @"DOCTYPE as range boundary is invalid");
|
||||
XCTAssertThrows([range setStartNode:_firstText startOffset:_firstText.length + 1], @"Offset is outside the boundary node");
|
||||
|
||||
@@ -2112,10 +2112,10 @@
|
||||
@autoreleasepool {
|
||||
HTMLRange *range = [[HTMLRange alloc] initWithDocument:document];
|
||||
[range cloneContents];
|
||||
XCTAssertEqual(1, ranges.count);
|
||||
XCTAssertEqual(1, ranges.allObjects.count);
|
||||
}
|
||||
|
||||
XCTAssertEqual(0, ranges.count);
|
||||
XCTAssertEqual(0, ranges.allObjects.count);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// HTMLSerializationTests.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 06.11.17.
|
||||
// Copyright © 2017 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLKitTestUtil.h"
|
||||
|
||||
#define Assert(input, expected) \
|
||||
do { \
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:input]; \
|
||||
XCTAssertEqualObjects(document.body.innerHTML, expected); \
|
||||
} while(0)
|
||||
|
||||
#define AssertH(input, expected) \
|
||||
do { \
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:input]; \
|
||||
XCTAssertEqualObjects(document.head.innerHTML, expected); \
|
||||
} while(0)
|
||||
|
||||
@interface HTMLSerializationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation HTMLSerializationTests
|
||||
|
||||
- (void)testSerializer
|
||||
{
|
||||
Assert(@"", @"");
|
||||
Assert(@"<a a=\r\n", @"");
|
||||
Assert(@"<p><i>Hello!</p>, World!</i>", @"<p><i>Hello!</i></p><i>, World!</i>");
|
||||
Assert(@"<p><i>Hello</i>, World!</p>", @"<p><i>Hello</i>, World!</p>");
|
||||
AssertH(@"<base foo=\"<'>\">", @"<base foo=\"<'>\">");
|
||||
AssertH(@"<base foo=\"&\">", @"<base foo=\"&\">");
|
||||
AssertH(@"<base foo=&>", @"<base foo=\"&\">");
|
||||
AssertH(@"<base foo=x0x00A0y>", @"<base foo=\"x y\">");
|
||||
AssertH(@"<base foo='\"'>", @"<base foo=\""\">");
|
||||
Assert(@"<span foo=3 title='test \"with\" &quot;'>", @"<span foo=\"3\" title=\"test "with" &quot;\"></span>");
|
||||
Assert(@"<p>\"'\"</p>", @"<p>\"'\"</p>");
|
||||
Assert(@"<p>&</p>", @"<p>&</p>");
|
||||
Assert(@"<p>&</p>", @"<p>&</p>");
|
||||
Assert(@"<p><</p>", @"<p><</p>");
|
||||
Assert(@"<p>></p>", @"<p>></p>");
|
||||
Assert(@"<p>></p>", @"<p>></p>");
|
||||
AssertH(@"<script>(x & 1) < 2; y > \"foo\" + 'bar'</script>", @"<script>(x & 1) < 2; y > \"foo\" + 'bar'</script>");
|
||||
AssertH(@"<style>(x & 1) < 2; y > \"foo\" + 'bar'</style>", @"<style>(x & 1) < 2; y > \"foo\" + 'bar'</style>");
|
||||
Assert(@"<xmp>(x & 1) < 2; y > \"foo\" + 'bar'</xmp>", @"<xmp>(x & 1) < 2; y > \"foo\" + 'bar'</xmp>");
|
||||
Assert(@"<iframe>(x & 1) < 2; y > \"foo\" + 'bar'</iframe>", @"<iframe>(x & 1) < 2; y > \"foo\" + 'bar'</iframe>");
|
||||
Assert(@"<noembed>(x & 1) < 2; y > \"foo\" + 'bar'</noembed>", @"<noembed>(x & 1) < 2; y > \"foo\" + 'bar'</noembed>");
|
||||
AssertH(@"<noframes>(x & 1) < 2; y > \"foo\" + 'bar'</noframes>", @"<noframes>(x & 1) < 2; y > \"foo\" + 'bar'</noframes>");
|
||||
Assert(@"<pre>foo bar</pre>", @"<pre>foo bar</pre>");
|
||||
Assert(@"<pre>\nfoo bar</pre>", @"<pre>foo bar</pre>");
|
||||
Assert(@"<pre>\n\nfoo bar</pre>", @"<pre>\nfoo bar</pre>");
|
||||
Assert(@"<textarea>foo bar</textarea>", @"<textarea>foo bar</textarea>");
|
||||
Assert(@"<textarea>\nfoo bar</textarea>", @"<textarea>foo bar</textarea>");
|
||||
Assert(@"<textarea>\n\nfoo bar</textarea>", @"<textarea>\nfoo bar</textarea>");
|
||||
Assert(@"<listing>foo bar</listing>", @"<listing>foo bar</listing>");
|
||||
Assert(@"<listing>\nfoo bar</listing>", @"<listing>foo bar</listing>");
|
||||
Assert(@"<listing>\n\nfoo bar</listing>", @"<listing>\nfoo bar</listing>");
|
||||
Assert(@"<p>hi <!--world--></p>", @"<p>hi <!--world--></p>");
|
||||
Assert(@"<p>hi <!-- world--></p>", @"<p>hi <!-- world--></p>");
|
||||
Assert(@"<p>hi <!--world --></p>", @"<p>hi <!--world --></p>");
|
||||
Assert(@"<p>hi <!-- world --></p>", @"<p>hi <!-- world --></p>");
|
||||
Assert(@"<svg xmlns=\"bleh\"></svg>", @"<svg xmlns=\"bleh\"></svg>");
|
||||
Assert(@"<svg xmlns:foo=\"bleh\"></svg>", @"<svg xmlns:foo=\"bleh\"></svg>");
|
||||
Assert(@"<svg xmlns:xlink=\"bleh\"></svg>", @"<svg xmlns:xlink=\"bleh\"></svg>");
|
||||
Assert(@"<svg xlink:href=\"bleh\"></svg>", @"<svg xlink:href=\"bleh\"></svg>");
|
||||
}
|
||||
|
||||
#pragma mark - Bug Fixes
|
||||
|
||||
- (void)testBugFix_Issue_16
|
||||
{
|
||||
NSString *html = @"<body><div><test></div></body>";
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:html];
|
||||
|
||||
XCTAssertEqualObjects(document.body.outerHTML, html);
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_17
|
||||
{
|
||||
NSString *html = @"<body key='& testing 0x00A0'></body>";
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:html];
|
||||
|
||||
XCTAssertEqualObjects(document.body.outerHTML, @"<body key=\"& testing \"></body>");
|
||||
}
|
||||
|
||||
- (void)testBugFix_Issue_33
|
||||
{
|
||||
NSString *path = [HTMLKitTestUtil pathForFixture:@"bug33" ofType:@"html" inDirectory:@"Fixtures"];
|
||||
NSString *html = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
|
||||
HTMLDocument *document = [HTMLDocument documentWithString:html];
|
||||
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"HTML serializes despite limited recursion depth"];
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
[document.rootElement outerHTML];
|
||||
[expectation fulfill];
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithTimeout:500 handler:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "NSString+Private.h"
|
||||
#import "NSString+HTMLKit.h"
|
||||
|
||||
@interface HTMLKitStringCategoryTests : XCTestCase
|
||||
@@ -50,33 +51,33 @@
|
||||
|
||||
- (void)testIsHTMLWhitespaceString
|
||||
{
|
||||
XCTAssertTrue([@" " isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\t" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\n" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\f" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\r" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@" \t\n\f\r" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\t\n\f\r " isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@" \t \n \f \r" isHTMLWhitespaceString]);
|
||||
XCTAssertFalse([@"html kit" isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@" " htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\t" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\n" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\f" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\r" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@" \t\n\f\r" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@"\t\n\f\r " htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertTrue([@" \t \n \f \r" htmlkit_isHTMLWhitespaceString]);
|
||||
XCTAssertFalse([@"html kit" htmlkit_isHTMLWhitespaceString]);
|
||||
}
|
||||
|
||||
- (void)testLeadingWhitespaceLength
|
||||
{
|
||||
XCTAssertEqual([@"" leadingHTMLWhitespaceLength], 0);
|
||||
XCTAssertEqual([@"\0" leadingHTMLWhitespaceLength], 0);
|
||||
XCTAssertEqual([@"" htmlkit_leadingHTMLWhitespaceLength], 0);
|
||||
XCTAssertEqual([@"\0" htmlkit_leadingHTMLWhitespaceLength], 0);
|
||||
|
||||
XCTAssertEqual([@" " leadingHTMLWhitespaceLength], 1);
|
||||
XCTAssertEqual([@"\0 " leadingHTMLWhitespaceLength], 0);
|
||||
XCTAssertEqual([@" " htmlkit_leadingHTMLWhitespaceLength], 1);
|
||||
XCTAssertEqual([@"\0 " htmlkit_leadingHTMLWhitespaceLength], 0);
|
||||
|
||||
XCTAssertEqual([@" " leadingHTMLWhitespaceLength], 2);
|
||||
XCTAssertEqual([@" \0 " leadingHTMLWhitespaceLength], 1);
|
||||
XCTAssertEqual([@" " htmlkit_leadingHTMLWhitespaceLength], 2);
|
||||
XCTAssertEqual([@" \0 " htmlkit_leadingHTMLWhitespaceLength], 1);
|
||||
|
||||
XCTAssertEqual([@"\t\r\n\f" leadingHTMLWhitespaceLength], 4);
|
||||
XCTAssertEqual([@"\t\r\n\0\f" leadingHTMLWhitespaceLength], 3);
|
||||
XCTAssertEqual([@"\t\r\n\f" htmlkit_leadingHTMLWhitespaceLength], 4);
|
||||
XCTAssertEqual([@"\t\r\n\0\f" htmlkit_leadingHTMLWhitespaceLength], 3);
|
||||
|
||||
XCTAssertEqual([@"\t\r\n\f " leadingHTMLWhitespaceLength], 5);
|
||||
XCTAssertEqual([@"\t\r\n\f\0 " leadingHTMLWhitespaceLength], 4);
|
||||
XCTAssertEqual([@"\t\r\n\f " htmlkit_leadingHTMLWhitespaceLength], 5);
|
||||
XCTAssertEqual([@"\t\r\n\f\0 " htmlkit_leadingHTMLWhitespaceLength], 4);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// HTMLTreeVisitorTests.m
|
||||
// HTMLKit
|
||||
//
|
||||
// Created by Iska on 30.07.19.
|
||||
// Copyright © 2019 BrainCookie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLElement.h"
|
||||
#import "HTMLNode+Private.h"
|
||||
|
||||
@interface HTMLTreeVisitorTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation HTMLTreeVisitorTests
|
||||
|
||||
#pragma mark - Asserts
|
||||
|
||||
#define AssertElementWithId(input, id) \
|
||||
do { \
|
||||
HTMLNode *node = input;\
|
||||
XCTAssertEqual(node.nodeType, HTMLNodeElement);\
|
||||
XCTAssertEqualObjects(node.asElement[@"id"], id);\
|
||||
} while(0)
|
||||
|
||||
#define AssertTextWithValue(input, value) \
|
||||
do { \
|
||||
HTMLNode *node = input;\
|
||||
XCTAssertEqual(node.nodeType, HTMLNodeText);\
|
||||
XCTAssertEqualObjects(node.textContent, value);\
|
||||
} while(0)
|
||||
|
||||
#define AssertCommentWithValue(input, value) \
|
||||
do { \
|
||||
HTMLNode *node = input;\
|
||||
XCTAssertEqual(node.nodeType, HTMLNodeComment);\
|
||||
XCTAssertEqualObjects(node.textContent, value);\
|
||||
} while(0)
|
||||
|
||||
#pragma mark - Basic Walking
|
||||
|
||||
- (HTMLNode *)testDOM
|
||||
{
|
||||
// Tree structure:
|
||||
// #a
|
||||
// |
|
||||
// +----+----+
|
||||
// | |
|
||||
// #b #c
|
||||
// |
|
||||
// +----+----+
|
||||
// | |
|
||||
// #d #j
|
||||
// |
|
||||
// +----+----+
|
||||
// | | |
|
||||
// #e #f #i
|
||||
// |
|
||||
// +--+--+
|
||||
// | |
|
||||
// #g #h
|
||||
|
||||
HTMLElement *div = [[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"a"}];
|
||||
|
||||
[div appendNode:[[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"b"}]];
|
||||
|
||||
HTMLElement *c = [[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"c"}];
|
||||
[div appendNode:c];
|
||||
|
||||
HTMLElement *d = [[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"d"}];
|
||||
[c appendNode:d];
|
||||
[c appendNode:[[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"j"}]];
|
||||
|
||||
[d appendNode:[[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"e"}]];
|
||||
|
||||
HTMLElement *f = [[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"f"}];
|
||||
[d appendNode:f];
|
||||
[d appendNode:[[HTMLElement alloc] initWithTagName:@"div" attributes:@{@"id": @"i"}]];
|
||||
|
||||
[f appendNode:[[HTMLElement alloc] initWithTagName:@"g" attributes:@{@"id": @"g"}]];
|
||||
[f appendNode:[[HTMLElement alloc] initWithTagName:@"h" attributes:@{@"id": @"h"}]];
|
||||
|
||||
return div;
|
||||
}
|
||||
|
||||
- (void)testTreeVisitor
|
||||
{
|
||||
HTMLNode *root = self.testDOM;
|
||||
HTMLTreeVisitor *visitor = [[HTMLTreeVisitor alloc] initWithNode:root];
|
||||
|
||||
NSMutableArray *visited = [NSMutableArray array];
|
||||
|
||||
[visitor walkWithNodeVisitor:[HTMLNodeVisitorBlock visitorWithEnterBlock:^(HTMLNode *node) {
|
||||
[visited addObject:[NSString stringWithFormat:@"E %@", node.asElement.elementId]];
|
||||
} leaveBlock:^(HTMLNode *node) {
|
||||
[visited addObject:[NSString stringWithFormat:@"L %@", node.asElement.elementId]];
|
||||
}]];
|
||||
|
||||
NSArray *expected = @[@"E a", @"E b", @"L b", @"E c", @"E d", @"E e", @"L e", @"E f", @"E g", @"L g", @"E h", @"L h",
|
||||
@"L f", @"E i", @"L i", @"L d", @"E j", @"L j", @"L c", @"L a"];
|
||||
|
||||
XCTAssertEqualObjects(visited, expected);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "HTMLTreeWalker.h"
|
||||
#import "HTMLDOM.h"
|
||||
#import "HTMLNode+Private.h"
|
||||
|
||||
|
||||
+1
-1
Submodule Tests/html5lib-tests updated: cbafeba945...082a4be911
Reference in New Issue
Block a user