[Cairo] Canvas putImageData is not working as expected
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-19  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
2
3         [Cairo] Canvas putImageData is not working as expected
4         https://bugs.webkit.org/show_bug.cgi?id=119992
5
6         Reviewed by Darin Adler.
7
8         ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
9         If the alpha value is not 255, image data should always be pre-multiplied.
10
11         Test: fast/canvas/canvas-putImageData-zero-alpha.html
12
13         * platform/graphics/cairo/ImageBufferCairo.cpp:
14         (WebCore::ImageBuffer::putByteArray):
15
16 2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
17
18         <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
19
20         Reviewed by Darin Adler.
21
22         Resolving code error.
23
24         * html/BaseDateAndTimeInputType.cpp:
25         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
26         * html/MonthInputType.cpp:
27         (WebCore::MonthInputType::defaultValueForStepUp):
28         * html/TimeInputType.cpp:
29         (WebCore::TimeInputType::defaultValueForStepUp):
30
31 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
32
33         <https://webkit.org/b/120049> Delete code for Snow Leopard
34
35         Reviewed by Benjamin Poulain.
36
37         Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
38
39         * WebCore.exp.in:
40         * WebCore.xcodeproj/project.pbxproj:
41         * editing/mac/EditorMac.mm:
42         (WebCore::Editor::pasteWithPasteboard):
43         * page/ContextMenuController.cpp:
44         (WebCore::ContextMenuController::populate):
45         * platform/LocalizedStrings.cpp:
46         (WebCore::truncatedStringForLookupMenuItem):
47         (WebCore::contextMenuItemTagSearchWeb):
48         (WebCore::contextMenuItemTagLookUpInDictionary):
49         * platform/MemoryPressureHandler.cpp:
50         * platform/audio/mac/AudioBusMac.mm:
51         (WebCore::AudioBus::loadPlatformResource):
52         * platform/graphics/ca/GraphicsLayerCA.cpp:
53         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
54         * platform/graphics/ca/PlatformCALayer.h:
55         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
56         (PlatformCALayer::acceleratesDrawing):
57         (PlatformCALayer::setAcceleratesDrawing):
58         (PlatformCALayer::contentsScale):
59         (PlatformCALayer::setContentsScale):
60         (PlatformCALayer::synchronouslyDisplayTilesInRect):
61         * platform/graphics/ca/mac/TileController.mm:
62         (WebCore::TileController::setScale):
63         (WebCore::TileController::setAcceleratesDrawing):
64         (WebCore::TileController::createTileLayer):
65         * platform/graphics/cg/ImageBufferDataCG.cpp:
66         (WebCore::ImageBufferData::getData):
67         (WebCore::ImageBufferData::putData):
68         * platform/graphics/cg/ImageBufferDataCG.h:
69         * platform/graphics/cg/PathCG.cpp:
70         (WebCore::Path::platformAddPathForRoundedRect):
71         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
72         (WebCore::FontPlatformData::FontPlatformData):
73         (WebCore::FontPlatformData::setFont):
74         * platform/graphics/mac/FontMac.mm:
75         (WebCore::showGlyphsWithAdvances):
76         * platform/graphics/mac/GraphicsContextMac.mm:
77         (WebCore::GraphicsContext::drawLineForDocumentMarker):
78         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
79         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
80         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
81         * platform/graphics/mac/WebLayer.mm:
82         (drawLayerContents):
83         * platform/mac/CursorMac.mm:
84         (WebCore::Cursor::ensurePlatformCursor):
85         * platform/mac/EmptyProtocolDefinitions.h: Removed.
86         * platform/mac/MemoryPressureHandlerMac.mm:
87         (WebCore::MemoryPressureHandler::releaseMemory):
88         * platform/mac/NSScrollerImpDetails.h:
89         * platform/mac/PlatformEventFactoryMac.mm:
90         (WebCore::momentumPhaseForEvent):
91         (WebCore::phaseForEvent):
92         * platform/mac/ScrollAnimatorMac.mm:
93         * platform/mac/SharedTimerMac.mm:
94         * platform/mac/WebCoreSystemInterface.h:
95         * platform/mac/WebCoreSystemInterface.mm:
96         * platform/network/mac/ResourceHandleMac.mm:
97         * platform/network/mac/ResourceRequestMac.mm:
98         (WebCore::ResourceRequest::doUpdateResourceRequest):
99         (WebCore::ResourceRequest::doUpdatePlatformRequest):
100         * platform/text/cf/HyphenationCF.cpp:
101         * platform/text/mac/HyphenationMac.mm: Removed.
102         * rendering/RenderLayerBacking.cpp:
103         (WebCore::RenderLayerBacking::containsPaintedContent):
104         * rendering/RenderThemeMac.mm:
105         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
106
107 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
108
109         <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
110
111         Reviewed by Simon Fraser.
112
113         Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
114
115         They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
116
117         * rendering/RenderBlock.cpp:
118         (WebCore::RenderBlock::computeOverflow):
119
120 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
121
122         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
123
124         Reviewed by Kent Tamura.
125
126         Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
127
128         In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
129         which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
130
131         Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
132
133         Test: fast/forms/range/range-type-change-oninput.html
134
135         * html/shadow/SliderThumbElement.cpp:
136         (WebCore::SliderThumbElement::isDisabledFormControl):
137         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
138         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
139         (WebCore::SliderThumbElement::setPositionFromPoint):
140         (WebCore::SliderThumbElement::hostInput):
141
142 2013-08-19  Alexey Proskuryakov  <ap@apple.com>
143
144         https://bugs.webkit.org/show_bug.cgi?id=120028
145         ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
146         when navigating to an uncached subframe
147
148         Reviewed by Brady Eidson.
149
150         Test: http/tests/navigation/post-frames-goback1-uncached.html
151
152         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
153         Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
154
155         * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
156         Now that we always set m_requestedHistoryItem, there is no need to traverse frame
157         tree to see if this document is being loaded as part of b/f navigation (which was
158         add in bug 90870).
159
160 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
161
162         https://bugs.webkit.org/show_bug.cgi?id=120034
163         Remove custom getOwnPropertyDescriptor for global objects
164
165         Reviewed by Geoff Garen.
166
167         Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
168
169         * bindings/js/JSDOMWindowCustom.cpp:
170         (WebCore::JSDOMWindow::getOwnPropertySlot):
171             - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
172               all properties are marked as read-only, non-configurable to prevent defineProperty.
173
174 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
175
176         https://bugs.webkit.org/show_bug.cgi?id=119995
177         Start removing custom implementations of getOwnPropertyDescriptor
178
179         Reviewed by Sam Weinig.
180
181         This can now typically implemented in terms of getOwnPropertySlot.
182         Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
183         Switch over most classes in JSC & the WebCore bindings generator to use this.
184
185         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
186         * bindings/js/JSHTMLAppletElementCustom.cpp:
187         * bindings/js/JSHTMLEmbedElementCustom.cpp:
188         * bindings/js/JSHTMLObjectElementCustom.cpp:
189         * bindings/js/JSHistoryCustom.cpp:
190         (WebCore::JSHistory::getOwnPropertySlotDelegate):
191         * bindings/js/JSLocationCustom.cpp:
192         (WebCore::JSLocation::getOwnPropertySlotDelegate):
193         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
194             - Remove getOwnPropertyDescriptorDelegate methods,
195               Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
196         * bindings/scripts/CodeGeneratorJS.pm:
197         (GenerateHeader):
198         (GenerateImplementation):
199         (GenerateConstructorHelperMethods):
200             - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
201         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
202         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
203         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
204         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
205         * bindings/scripts/test/JS/JSTestException.cpp:
206         * bindings/scripts/test/JS/JSTestInterface.cpp:
207         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
208         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
209         * bindings/scripts/test/JS/JSTestNode.cpp:
210         * bindings/scripts/test/JS/JSTestObj.cpp:
211         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
212         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
213         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
214             - Update test expectations.
215
216 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
217
218         <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
219
220         Reviewed by Darin Adler.
221
222         None of the attributes of RuleSet should be modified directly.
223
224         * css/DocumentRuleSets.cpp:
225         (WebCore::DocumentRuleSets::initUserStyle):
226         * css/ElementRuleCollector.cpp:
227         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
228         * css/RuleSet.h:
229         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
230         (WebCore::RuleSet::regionSelectorsAndRuleSets):
231         (WebCore::RuleSet::ruleCount):
232         * css/StyleResolver.cpp:
233         (WebCore::StyleResolver::checkRegionStyle):
234
235 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
236
237         <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
238
239         Reviewed by Darin Adler.
240
241         The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
242         and it is never changed by ElementRuleCollector.
243
244         * css/ElementRuleCollector.cpp:
245         (WebCore::ElementRuleCollector::collectMatchingRules):
246         (WebCore::ElementRuleCollector::ruleMatches):
247         * css/ElementRuleCollector.h:
248         (WebCore::ElementRuleCollector::ElementRuleCollector):
249
250 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
251
252         <https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
253
254         Reviewed by Darin Adler.
255
256         * css/ElementRuleCollector.h:
257
258 2013-08-19  Pratik Solanki  <psolanki@apple.com>
259
260         <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
261
262         Reviewed by Andreas Kling.
263
264         Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
265
266         * css/StyleResolver.cpp:
267         (WebCore::StyleResolver::State::initElement):
268         * dom/Document.h:
269         (WebCore::Document::visitedLinkState):
270         * history/CachedPage.cpp:
271         (WebCore::CachedPage::restore):
272         * page/Page.cpp:
273         (WebCore::Page::allVisitedStateChanged):
274         (WebCore::Page::visitedStateChanged):
275
276 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
277
278         ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
279         https://bugs.webkit.org/show_bug.cgi?id=119720
280
281         Reviewed by Andy Estes.
282
283         Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
284
285         * dom/EventRetargeter.h:
286         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
287
288 2013-08-19  Darin Adler  <darin@apple.com>
289
290         <https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
291
292         Reviewed by Andy Estes.
293
294         I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
295         The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
296         make a test case to show the mistake, I found I could not. So I wrote assertions to restate
297         what I learned, and removed an unneeded null check and tightened up the code a bit. This
298         should make code size slightly smaller.
299
300         * html/HTMLTableRowsCollection.cpp:
301         (WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
302         with the invariants of how the collection class works. A row that is processed here would have
303         to be an immediate child of the table, or an immediate child of a table section that in turn is
304         an immediate child of the table.
305         (WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
306         this does not do a null check.
307         (WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
308
309 2013-08-19  Pratik Solanki  <psolanki@apple.com>
310
311         <https://webkit.org/b/119918> Frame::selection() should return a reference
312
313         Reviewed by Darin Adler.
314
315         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
316         unnecessary null checks and assert diff ts exposed as a result.
317
318         * accessibility/AccessibilityRenderObject.cpp:
319         (WebCore::AccessibilityRenderObject::selection):
320         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
321         (WebCore::AccessibilityRenderObject::isFocused):
322         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
323         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
324         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
325         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
326         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
327         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
328         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
329         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
330         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
331         * css/SelectorChecker.cpp:
332         (WebCore::SelectorChecker::isFrameFocused):
333         * dom/CharacterData.cpp:
334         (WebCore::CharacterData::setDataAndUpdate):
335         * dom/Document.cpp:
336         (WebCore::Document::nodeChildrenWillBeRemoved):
337         (WebCore::Document::nodeWillBeRemoved):
338         * dom/Element.cpp:
339         (WebCore::Element::updateFocusAppearance):
340         * editing/AlternativeTextController.cpp:
341         (WebCore::AlternativeTextController::stopPendingCorrection):
342         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
343         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
344         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
345         (WebCore::AlternativeTextController::timerFired):
346         (WebCore::AlternativeTextController::respondToChangedSelection):
347         * editing/DeleteButtonController.cpp:
348         (WebCore::DeleteButtonController::respondToChangedSelection):
349         (WebCore::DeleteButtonController::enable):
350         (WebCore::DeleteButtonController::deleteTarget):
351         * editing/DeleteSelectionCommand.cpp:
352         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
353         * editing/DictationCommand.cpp:
354         (WebCore::DictationCommand::insertText):
355         * editing/EditCommand.cpp:
356         (WebCore::EditCommand::EditCommand):
357         * editing/EditingStyle.cpp:
358         (WebCore::EditingStyle::mergeTypingStyle):
359         * editing/Editor.cpp:
360         (WebCore::Editor::selectionForCommand):
361         (WebCore::Editor::canEdit):
362         (WebCore::Editor::canEditRichly):
363         (WebCore::Editor::canDHTMLCut):
364         (WebCore::Editor::canDHTMLCopy):
365         (WebCore::Editor::canCopy):
366         (WebCore::Editor::canDelete):
367         (WebCore::Editor::canSmartCopyOrDelete):
368         (WebCore::Editor::deleteWithDirection):
369         (WebCore::Editor::deleteSelectionWithSmartDelete):
370         (WebCore::Editor::replaceSelectionWithFragment):
371         (WebCore::Editor::selectedRange):
372         (WebCore::Editor::tryDHTMLCopy):
373         (WebCore::Editor::tryDHTMLCut):
374         (WebCore::Editor::hasBidiSelection):
375         (WebCore::Editor::selectionUnorderedListState):
376         (WebCore::Editor::selectionOrderedListState):
377         (WebCore::Editor::increaseSelectionListLevel):
378         (WebCore::Editor::increaseSelectionListLevelOrdered):
379         (WebCore::Editor::increaseSelectionListLevelUnordered):
380         (WebCore::Editor::decreaseSelectionListLevel):
381         (WebCore::Editor::findEventTargetFromSelection):
382         (WebCore::Editor::applyStyle):
383         (WebCore::Editor::applyParagraphStyle):
384         (WebCore::Editor::applyStyleToSelection):
385         (WebCore::Editor::applyParagraphStyleToSelection):
386         (WebCore::Editor::selectionStartHasStyle):
387         (WebCore::Editor::selectionHasStyle):
388         (WebCore::Editor::selectionStartCSSPropertyValue):
389         (WebCore::Editor::appliedEditing):
390         (WebCore::Editor::insertTextWithoutSendingTextEvent):
391         (WebCore::Editor::insertLineBreak):
392         (WebCore::Editor::insertParagraphSeparator):
393         (WebCore::Editor::cut):
394         (WebCore::Editor::copy):
395         (WebCore::Editor::paste):
396         (WebCore::Editor::baseWritingDirectionForSelectionStart):
397         (WebCore::Editor::selectComposition):
398         (WebCore::Editor::setComposition):
399         (WebCore::Editor::ignoreSpelling):
400         (WebCore::Editor::learnSpelling):
401         (WebCore::Editor::advanceToNextMisspelling):
402         (WebCore::Editor::misspelledWordAtCaretOrRange):
403         (WebCore::Editor::isSelectionUngrammatical):
404         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
405         (WebCore::Editor::markMisspellingsAfterTypingToWord):
406         (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
407         (WebCore::Editor::markAndReplaceFor):
408         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
409         (WebCore::Editor::revealSelectionAfterEditingOperation):
410         (WebCore::Editor::getCompositionSelection):
411         (WebCore::Editor::transpose):
412         (WebCore::Editor::changeSelectionAfterCommand):
413         (WebCore::Editor::selectedText):
414         (WebCore::Editor::computeAndSetTypingStyle):
415         (WebCore::Editor::findString):
416         (WebCore::Editor::respondToChangedSelection):
417         (WebCore::Editor::selectionStartHasMarkerFor):
418         (WebCore::Editor::toggleOverwriteModeEnabled):
419         * editing/EditorCommand.cpp:
420         (WebCore::executeToggleStyleInList):
421         (WebCore::expandSelectionToGranularity):
422         (WebCore::stateTextWritingDirection):
423         (WebCore::executeDelete):
424         (WebCore::executeDeleteToMark):
425         (WebCore::executeMoveBackward):
426         (WebCore::executeMoveBackwardAndModifySelection):
427         (WebCore::executeMoveDown):
428         (WebCore::executeMoveDownAndModifySelection):
429         (WebCore::executeMoveForward):
430         (WebCore::executeMoveForwardAndModifySelection):
431         (WebCore::executeMoveLeft):
432         (WebCore::executeMoveLeftAndModifySelection):
433         (WebCore::executeMovePageDown):
434         (WebCore::executeMovePageDownAndModifySelection):
435         (WebCore::executeMovePageUp):
436         (WebCore::executeMovePageUpAndModifySelection):
437         (WebCore::executeMoveRight):
438         (WebCore::executeMoveRightAndModifySelection):
439         (WebCore::executeMoveToBeginningOfDocument):
440         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
441         (WebCore::executeMoveToBeginningOfLine):
442         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
443         (WebCore::executeMoveToBeginningOfParagraph):
444         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
445         (WebCore::executeMoveToBeginningOfSentence):
446         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
447         (WebCore::executeMoveToEndOfDocument):
448         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
449         (WebCore::executeMoveToEndOfSentence):
450         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
451         (WebCore::executeMoveToEndOfLine):
452         (WebCore::executeMoveToEndOfLineAndModifySelection):
453         (WebCore::executeMoveToEndOfParagraph):
454         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
455         (WebCore::executeMoveParagraphBackwardAndModifySelection):
456         (WebCore::executeMoveParagraphForwardAndModifySelection):
457         (WebCore::executeMoveUp):
458         (WebCore::executeMoveUpAndModifySelection):
459         (WebCore::executeMoveWordBackward):
460         (WebCore::executeMoveWordBackwardAndModifySelection):
461         (WebCore::executeMoveWordForward):
462         (WebCore::executeMoveWordForwardAndModifySelection):
463         (WebCore::executeMoveWordLeft):
464         (WebCore::executeMoveWordLeftAndModifySelection):
465         (WebCore::executeMoveWordRight):
466         (WebCore::executeMoveWordRightAndModifySelection):
467         (WebCore::executeMoveToLeftEndOfLine):
468         (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
469         (WebCore::executeMoveToRightEndOfLine):
470         (WebCore::executeMoveToRightEndOfLineAndModifySelection):
471         (WebCore::executeSelectAll):
472         (WebCore::executeSelectToMark):
473         (WebCore::executeSetMark):
474         (WebCore::executeSwapWithMark):
475         (WebCore::executeUnselect):
476         (WebCore::enabledInRichlyEditableText):
477         (WebCore::enabledRangeInEditableText):
478         (WebCore::enabledRangeInRichlyEditableText):
479         (WebCore::valueFormatBlock):
480         * editing/FrameSelection.cpp:
481         (WebCore::FrameSelection::setSelection):
482         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
483         * editing/InsertLineBreakCommand.cpp:
484         (WebCore::InsertLineBreakCommand::doApply):
485         * editing/InsertTextCommand.cpp:
486         (WebCore::InsertTextCommand::doApply):
487         * editing/ModifySelectionListLevel.cpp:
488         (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
489         (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
490         * editing/RemoveFormatCommand.cpp:
491         (WebCore::RemoveFormatCommand::doApply):
492         * editing/ReplaceSelectionCommand.cpp:
493         (WebCore::ReplaceSelectionCommand::doApply):
494         * editing/SetSelectionCommand.cpp:
495         (WebCore::SetSelectionCommand::doApply):
496         (WebCore::SetSelectionCommand::doUnapply):
497         * editing/SpellingCorrectionCommand.cpp:
498         (WebCore::SpellingCorrectionCommand::doApply):
499         * editing/TextInsertionBaseCommand.cpp:
500         (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
501         * editing/TypingCommand.cpp:
502         (WebCore::TypingCommand::deleteSelection):
503         (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
504         (WebCore::TypingCommand::insertText):
505         (WebCore::TypingCommand::deleteKeyPressed):
506         (WebCore::TypingCommand::forwardDeleteKeyPressed):
507         * editing/ios/EditorIOS.mm:
508         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
509         (WebCore::styleForSelectionStart):
510         (WebCore::Editor::fontForSelection):
511         * editing/mac/EditorMac.mm:
512         (WebCore::styleForSelectionStart):
513         (WebCore::Editor::fontForSelection):
514         (WebCore::Editor::canCopyExcludingStandaloneImages):
515         (WebCore::Editor::readSelectionFromPasteboard):
516         * html/HTMLAnchorElement.cpp:
517         (WebCore::HTMLAnchorElement::defaultEventHandler):
518         (WebCore::HTMLAnchorElement::setActive):
519         * html/HTMLInputElement.cpp:
520         (WebCore::HTMLInputElement::updateFocusAppearance):
521         * html/HTMLTextAreaElement.cpp:
522         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
523         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
524         * html/HTMLTextFormControlElement.cpp:
525         (WebCore::HTMLTextFormControlElement::setSelectionRange):
526         (WebCore::HTMLTextFormControlElement::computeSelectionStart):
527         (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
528         (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
529         (WebCore::HTMLTextFormControlElement::selectionChanged):
530         * html/TextFieldInputType.cpp:
531         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
532         * loader/FrameLoader.cpp:
533         (WebCore::FrameLoader::clear):
534         * loader/archive/cf/LegacyWebArchive.cpp:
535         (WebCore::LegacyWebArchive::createFromSelection):
536         * page/ContextMenuController.cpp:
537         (WebCore::insertUnicodeCharacter):
538         (WebCore::ContextMenuController::contextMenuItemSelected):
539         (WebCore::selectionContainsPossibleWord):
540         (WebCore::ContextMenuController::populate):
541         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
542         * page/DOMSelection.cpp:
543         (WebCore::selectionShadowAncestor):
544         (WebCore::DOMSelection::visibleSelection):
545         (WebCore::DOMSelection::isCollapsed):
546         (WebCore::DOMSelection::type):
547         (WebCore::DOMSelection::rangeCount):
548         (WebCore::DOMSelection::collapse):
549         (WebCore::DOMSelection::collapseToEnd):
550         (WebCore::DOMSelection::collapseToStart):
551         (WebCore::DOMSelection::empty):
552         (WebCore::DOMSelection::setBaseAndExtent):
553         (WebCore::DOMSelection::setPosition):
554         (WebCore::DOMSelection::modify):
555         (WebCore::DOMSelection::extend):
556         (WebCore::DOMSelection::getRangeAt):
557         (WebCore::DOMSelection::removeAllRanges):
558         (WebCore::DOMSelection::addRange):
559         (WebCore::DOMSelection::deleteFromDocument):
560         (WebCore::DOMSelection::containsNode):
561         (WebCore::DOMSelection::toString):
562         * page/DragController.cpp:
563         (WebCore::DragController::dragIsMove):
564         (WebCore::setSelectionToDragCaret):
565         (WebCore::DragController::concludeEditDrag):
566         (WebCore::DragController::draggableElement):
567         (WebCore::selectElement):
568         (WebCore::dragLocForSelectionDrag):
569         (WebCore::DragController::startDrag):
570         * page/DragController.h:
571         * page/EventHandler.cpp:
572         (WebCore::setSelectionIfNeeded):
573         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
574         (WebCore::EventHandler::handleMousePressEventDoubleClick):
575         (WebCore::EventHandler::handleMousePressEventSingleClick):
576         (WebCore::EventHandler::updateSelectionForMouseDrag):
577         (WebCore::EventHandler::lostMouseCapture):
578         (WebCore::EventHandler::handleMouseReleaseEvent):
579         (WebCore::nodeIsNotBeingEdited):
580         (WebCore::EventHandler::selectCursor):
581         (WebCore::EventHandler::handleMousePressEvent):
582         (WebCore::EventHandler::handleMouseDoubleClickEvent):
583         (WebCore::EventHandler::dispatchMouseEvent):
584         (WebCore::EventHandler::sendContextMenuEvent):
585         (WebCore::EventHandler::sendContextMenuEventForKey):
586         (WebCore::handleKeyboardSelectionMovement):
587         (WebCore::EventHandler::handleDrag):
588         * page/FocusController.cpp:
589         (WebCore::FocusController::setFocusedFrame):
590         (WebCore::FocusController::setFocused):
591         (WebCore::FocusController::advanceFocusInDocumentOrder):
592         (WebCore::clearSelectionIfNeeded):
593         (WebCore::FocusController::setActive):
594         * page/Frame.cpp:
595         (WebCore::Frame::dragImageForSelection):
596         * page/Frame.h:
597         (WebCore::Frame::selection):
598         * page/FrameView.cpp:
599         (WebCore::FrameView::performPostLayoutTasks):
600         (WebCore::FrameView::paintContentsForSnapshot):
601         * page/Page.cpp:
602         (WebCore::Page::findString):
603         (WebCore::Page::findStringMatchingRanges):
604         (WebCore::Page::selection):
605         * page/mac/FrameMac.mm:
606         (WebCore::Frame::dragImageForSelection):
607         * page/mac/FrameSnapshottingMac.mm:
608         (WebCore::selectionImage):
609         * page/win/FrameWin.cpp:
610         (WebCore::imageFromSelection):
611         (WebCore::Frame::dragImageForSelection):
612         * platform/ios/PasteboardIOS.mm:
613         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
614         * rendering/HitTestResult.cpp:
615         (WebCore::HitTestResult::isSelected):
616         * rendering/RenderBlock.cpp:
617         (WebCore::RenderBlock::paintCaret):
618         * rendering/RenderImage.cpp:
619         (WebCore::RenderImage::paintAreaElementFocusRing):
620         * rendering/RenderLayer.cpp:
621         (WebCore::RenderLayer::scrollTo):
622         * rendering/RenderListBox.cpp:
623         (WebCore::RenderListBox::paintItemForeground):
624         (WebCore::RenderListBox::paintItemBackground):
625         * rendering/RenderObject.cpp:
626         (WebCore::RenderObject::selectionBackgroundColor):
627         (WebCore::RenderObject::selectionColor):
628         * rendering/RenderTextControlSingleLine.cpp:
629         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
630         * rendering/RenderTheme.cpp:
631         (WebCore::RenderTheme::isFocused):
632         * rendering/RenderThemeWin.cpp:
633         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
634         * rendering/RenderTreeAsText.cpp:
635         (WebCore::writeSelection):
636         * rendering/RenderView.cpp:
637         (WebCore::RenderView::setSelection):
638         * svg/SVGSVGElement.cpp:
639         (WebCore::SVGSVGElement::deselectAll):
640         * svg/SVGTextContentElement.cpp:
641         (WebCore::SVGTextContentElement::selectSubString):
642         * testing/Internals.cpp:
643         (WebCore::Internals::absoluteCaretBounds):
644         (WebCore::Internals::selectionBounds):
645
646 2013-08-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
647
648         <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
649
650         Reviewed by Darin Adler.
651
652         While compiling WebKitGTK+ for ARM a lot of warnings of this form
653         where shown (gcc 4.7.3):
654
655         ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
656 ../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
657
658         This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
659         which is part of WTF for this purpose, silencing the compiler.
660
661         * css/StylePropertySet.h:
662         (WebCore::ImmutableStylePropertySet::metadataArray):
663
664 2013-08-19  Antti Koivisto  <antti@apple.com>
665
666         <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
667
668         Reviewed by Dan Bernstein.
669
670         * html/HTMLStyleElement.cpp:
671         (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
672
673 2013-08-19  Chris Fleizach  <cfleizach@apple.com>
674
675         <https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
676
677         Reviewed by Darin Adler.
678
679         Expose the AXLanguage attribute for all objects.
680
681         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
682         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
683
684 2013-08-19  Brent Fulgham  <bfulgham@apple.com>
685
686         [Windows] Unreviewed gardening.
687
688         * WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
689         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
690
691 2013-08-19  Mario Sanchez Prada  <mario.prada@samsung.com>
692
693         <https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
694
695         Reviewed by Darin Adler.
696
697         This is a port from Blink originally written by Dominic Mazzoni:
698         https://src.chromium.org/viewvc/blink?revision=154977&view=revision
699
700         From the original commit:
701
702         Skips calling firstPositionInOrBeforeNode when a node doesn't have a
703         renderer, since there couldn't possibly be a visible position there.
704         This was particularly wasteful when trying to move the cursor up when at
705         the beginning of a document, as it did a O(n^2) scan through the document head.
706
707         Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
708
709         * editing/VisibleUnits.cpp:
710         (WebCore::previousRootInlineBoxCandidatePosition): Updated.
711         (WebCore::nextRootInlineBoxCandidatePosition): Updates.
712
713 2013-08-19  Andreas Kling  <akling@apple.com>
714
715         <https://webkit.org/b/120000> Chrome::client() should return a reference.
716
717         Reviewed by Antti Koivisto.
718
719         Chrome::m_client should never be null.
720
721 2013-08-19  Antti Koivisto  <antti@apple.com>
722
723         <https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
724
725         Reviewed by Andreas Kling.
726         
727         Saner names and class relations.
728
729         * CMakeLists.txt:
730         * GNUmakefile.list.am:
731         * Target.pri:
732         * WebCore.vcxproj/WebCore.vcxproj:
733         * WebCore.xcodeproj/project.pbxproj:
734         * dom/DOMAllInOne.cpp:
735         * dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
736         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
737         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
738         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
739         (WebCore::InlineStyleSheetOwner::removedFromDocument):
740         (WebCore::InlineStyleSheetOwner::clearDocumentData):
741         (WebCore::InlineStyleSheetOwner::childrenChanged):
742         (WebCore::InlineStyleSheetOwner::finishParsingChildren):
743         (WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
744         (WebCore::InlineStyleSheetOwner::clearSheet):
745         (WebCore::InlineStyleSheetOwner::createSheet):
746         (WebCore::InlineStyleSheetOwner::isLoading):
747         (WebCore::InlineStyleSheetOwner::sheetLoaded):
748         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
749         * dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
750         * dom/StyleElement.cpp: Removed.
751         * dom/StyleElement.h: Removed.
752         * html/HTMLStyleElement.cpp:
753         (WebCore::HTMLStyleElement::HTMLStyleElement):
754         (WebCore::HTMLStyleElement::~HTMLStyleElement):
755         (WebCore::HTMLStyleElement::parseAttribute):
756         (WebCore::HTMLStyleElement::finishParsingChildren):
757         (WebCore::HTMLStyleElement::insertedInto):
758         (WebCore::HTMLStyleElement::removedFrom):
759         (WebCore::HTMLStyleElement::childrenChanged):
760         * html/HTMLStyleElement.h:
761         * svg/SVGStyleElement.cpp:
762         (WebCore::SVGStyleElement::SVGStyleElement):
763         (WebCore::SVGStyleElement::~SVGStyleElement):
764         (WebCore::SVGStyleElement::parseAttribute):
765         (WebCore::SVGStyleElement::finishParsingChildren):
766         (WebCore::SVGStyleElement::insertedInto):
767         (WebCore::SVGStyleElement::removedFrom):
768         (WebCore::SVGStyleElement::childrenChanged):
769         * svg/SVGStyleElement.h:
770
771 2013-08-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
772
773         [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
774         https://bugs.webkit.org/show_bug.cgi?id=28113
775
776         Reviewed by Jocelyn Turcotte.
777
778         StylePainter::init() was called twice making it clobber the previous antialiasing setting.
779
780         This patch cleans up the construction so we only have one constructor with init inlined.
781
782         * platform/qt/RenderThemeQStyle.cpp:
783         (WebCore::StylePainterQStyle::StylePainterQStyle):
784         (WebCore::StylePainterQStyle::setupStyleOption):
785         * platform/qt/RenderThemeQStyle.h:
786         * platform/qt/RenderThemeQt.cpp:
787         (WebCore::StylePainter::StylePainter):
788         * platform/qt/RenderThemeQt.h:
789         * platform/qt/RenderThemeQtMobile.cpp:
790         (WebCore::StylePainterMobile::StylePainterMobile):
791
792 2013-08-19  Julien Brianceau  <jbrianceau@nds.com>
793
794         <https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
795
796         Reviewed by Andreas Kling.
797
798         Element::attach() doesn't exist anymore since r154257.
799
800         * xml/parser/XMLDocumentParserQt.cpp:
801         (WebCore::XMLDocumentParser::parseStartElement):
802
803 2013-08-19  Antti Koivisto  <antti@apple.com>
804
805         <https://webkit.org/b/120001> Clean up StyleElement
806
807         Reviewed by Andreas Kling.
808
809         - Make it non-virtual so we don't use virtual multiple inheritance
810         - Improve names
811         - Improve code clarity
812
813         * dom/StyleElement.cpp:
814         (WebCore::StyleElement::StyleElement):
815         (WebCore::StyleElement::insertedIntoDocument):
816         (WebCore::StyleElement::clearDocumentData):
817         (WebCore::StyleElement::childrenChanged):
818         (WebCore::StyleElement::finishParsingChildren):
819         (WebCore::StyleElement::createSheetFromTextContents):
820         (WebCore::isValidCSSContentType):
821         (WebCore::StyleElement::createSheet):
822         (WebCore::StyleElement::isLoading):
823         * dom/StyleElement.h:
824         (WebCore::StyleElement::setStyleSheetContentType):
825         (WebCore::StyleElement::setStyleSheetMedia):
826         * html/HTMLStyleElement.cpp:
827         (WebCore::HTMLStyleElement::parseAttribute):
828         * html/HTMLStyleElement.h:
829         * svg/SVGStyleElement.cpp:
830         (WebCore::SVGStyleElement::isSupportedAttribute):
831         (WebCore::SVGStyleElement::parseAttribute):
832         * svg/SVGStyleElement.h:
833
834 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
835
836         <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
837
838         Reviewed by Darin Adler.
839
840         Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
841
842         * rendering/svg/SVGRenderTreeAsText.cpp:
843         (WebCore::writeSVGGradientStop):
844
845 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
846
847         <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
848
849         Reviewed by Andreas Kling.
850
851         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
852         with toSVGAnimateElement().
853
854         * svg/SVGAnimateElement.cpp:
855         (WebCore::SVGAnimateElement::calculateAnimatedValue):
856         * svg/SVGAnimateElement.h:
857         (WebCore::toSVGAnimateElement):
858         * svg/SVGAnimationElement.cpp:
859         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
860
861 2013-08-19  Andreas Kling  <akling@apple.com>
862
863         <https://webkit.org/b/119997> Page::progress() should return a reference.
864
865         Reviewed by Antti Koivisto.
866
867         Page::m_progress is never null.
868
869 2013-08-18  Darin Adler  <darin@apple.com>
870
871         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
872
873         Reviewed by Sam Weinig.
874
875         * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
876         deleted functions, it is instead overrides the base class function with one that is
877         private and not defined, which accomplishes almost the same thing: An error, either
878         at compile time or link time.
879
880         * bindings/js/JSHTMLElementCustom.cpp:
881         (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
882         * dom/Document.cpp:
883         (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
884         * inspector/InspectorInstrumentation.h:
885         (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
886         (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
887         * inspector/InspectorStyleSheet.cpp:
888         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
889         * plugins/PluginView.cpp:
890         (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
891         returns 0. It will never return anything other than 0 in that case.
892         * rendering/RenderVideo.cpp:
893         (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
894         Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
895         fix that when/if we change the return type of Element::document to a reference.
896         * svg/SVGFEImageElement.cpp:
897         (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
898
899 2013-08-18  Darin Adler  <darin@apple.com>
900
901         <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
902
903         Reviewed by Sam Weinig.
904
905         * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
906         * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
907         * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
908         * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
909         * Target.pri: Removed ClipboardQt.cpp.
910         * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
911         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
912
913         * dom/Clipboard.cpp:
914         (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
915         other than Mac, identical to the old one used in GTK and Qt, and close to the one used
916         on Windows.
917
918         * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
919
920         * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
921         to a now-nonexistent class.
922
923         * platform/efl/ClipboardEfl.cpp: Removed.
924         * platform/gtk/ClipboardGtk.cpp: Removed.
925         * platform/qt/ClipboardQt.cpp: Removed.
926         * platform/win/ClipboardWin.cpp: Removed.
927
928 2013-08-17  Darin Adler  <darin@apple.com>
929
930         <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
931
932         Reviewed by Sam Weinig.
933
934         * dom/Clipboard.cpp:
935         (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
936         Initialize strings more efficiently. Put drag-specific data members inside an if statement.
937         Replace m_clipboardType with m_forDrag.
938         (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
939         Removed explicit clipboard type since constructor now defaults to copy and paste style.
940         (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
941         (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
942         (WebCore::Clipboard::setData): Ditto.
943         (WebCore::Clipboard::files): Ditto.
944         (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
945         be used when !ENABLE(DRAG_SUPPORT).
946         (WebCore::Clipboard::setDropEffect): Ditto.
947         (WebCore::Clipboard::effectAllowed): Ditto.
948         (WebCore::Clipboard::setEffectAllowed): Ditto.
949         (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
950         to this, and kep the overload that does not as well. Made the DragData argument a const&.
951         (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
952         (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
953         calling a dragStarted function.
954         (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
955         (WebCore::IEOpFromDragOp): Ditto.
956         (WebCore::Clipboard::sourceOperation): Ditto.
957         (WebCore::Clipboard::destinationOperation): Ditto.
958         (WebCore::Clipboard::setSourceOperation): Ditto.
959         (WebCore::Clipboard::setDestinationOperation): Ditto.
960
961         * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
962         class declarations as required. Removed non-helpful comment. Made ClipboardType a private
963         implementation detail. Moved functions that are not part of the DOM API down to a separate
964         section lower down in the class, and sorted the functions to match the order they appear
965         in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
966         effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
967         implementation since it's an implementation detail. Since this class is no longer polymorphic,
968         use only private, not protected. Make m_dragImageElement an Element, not a Node.
969
970         * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
971         these string properties can never return null strings anyway.
972
973         * page/DragController.cpp:
974         (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
975         (WebCore::DragController::performDrag): Ditto.
976         (WebCore::DragController::tryDHTMLDrag): Ditto.
977
978         * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
979         longer includes it.
980
981 2013-08-18  David Kilzer  <ddkilzer@apple.com>
982
983         WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
984         <http://webkit.org/b/119932>
985         <rdar://problem/14764085>
986
987         Reviewed by Darin Adler.
988
989         Add pragma statements to ignore -Wdeprecated-register warnings
990         in generated code.  Also ignore -Wunknown-pragmas so this
991         doesn't cause a build failure in older versions of clang.
992
993         * css/makeprop.pl:
994         (WebCore::findProperty): Remove register hints from parameters.
995         * css/makevalues.pl:
996         (WebCore::findValue): Ditto.
997         * platform/ColorData.gperf:
998         (WebCore::findColor): Ditto.
999
1000 2013-08-18  Antti Koivisto  <antti@apple.com>
1001
1002         <https://webkit.org/b/119987> Make Element::attach standalone function
1003
1004         Reviewed by Andreas Kling.
1005
1006         This patch turns Element::attach() and the related functions into standalone functions.
1007
1008         * dom/ContainerNode.cpp:
1009         (WebCore::attachChild):
1010         (WebCore::detachChild):
1011         * dom/ContainerNode.h:
1012         * dom/Document.cpp:
1013         (WebCore::Document::attach):
1014         (WebCore::Document::detach):
1015         * dom/Element.cpp:
1016         (WebCore::Element::~Element):
1017         (WebCore::Element::lazyReattach):
1018         (WebCore::Element::removeShadowRoot):
1019         
1020             Shadow root should be detached by now. Remove the detach call.
1021
1022         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
1023         (WebCore::Element::updatePseudoElement):
1024         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
1025         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
1026         
1027             Factor some parts of former Element::attach/detach() into member functions.
1028
1029         * dom/Element.h:
1030         * dom/ElementRareData.h:
1031         (WebCore::ElementRareData::releasePseudoElement):
1032         * dom/NodeRenderingContext.cpp:
1033         (WebCore::NodeRenderingContext::NodeRenderingContext):
1034         * dom/NodeRenderingContext.h:
1035         * dom/ShadowRoot.cpp:
1036         * dom/ShadowRoot.h:
1037         * html/HTMLDetailsElement.cpp:
1038         (WebCore::HTMLDetailsElement::parseAttribute):
1039         * html/HTMLInputElement.cpp:
1040         (WebCore::HTMLInputElement::updateType):
1041         (WebCore::HTMLInputElement::parseAttribute):
1042         * html/HTMLObjectElement.cpp:
1043         (WebCore::HTMLObjectElement::renderFallbackContent):
1044         * html/HTMLPlugInImageElement.cpp:
1045         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
1046         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
1047         * html/HTMLSelectElement.cpp:
1048         (WebCore::HTMLSelectElement::parseAttribute):
1049         (WebCore::HTMLSelectElement::parseMultipleAttribute):
1050         * html/HTMLViewSourceDocument.cpp:
1051         (WebCore::HTMLViewSourceDocument::createContainingTable):
1052         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1053         (WebCore::HTMLViewSourceDocument::addLine):
1054         (WebCore::HTMLViewSourceDocument::finishLine):
1055         (WebCore::HTMLViewSourceDocument::addBase):
1056         (WebCore::HTMLViewSourceDocument::addLink):
1057         * html/parser/HTMLConstructionSite.cpp:
1058         (WebCore::executeTask):
1059         * html/parser/HTMLTreeBuilder.cpp:
1060         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1061         * html/shadow/InsertionPoint.cpp:
1062         (WebCore::InsertionPoint::willAttachRenderers):
1063         (WebCore::InsertionPoint::willDetachRenderers):
1064         * loader/PlaceholderDocument.cpp:
1065         (WebCore::PlaceholderDocument::attach):
1066         * style/StyleResolveTree.cpp:
1067         (WebCore::Style::createRendererIfNeeded):
1068         
1069             From Element::createRendererIfNeeded()
1070
1071         (WebCore::Style::attachShadowRoot):
1072         
1073             From ShadowRoot::attach()
1074
1075         (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
1076         (WebCore::Style::attachChildren):
1077         
1078             From Element::attachChildren()
1079
1080         (WebCore::Style::attachRenderTree):
1081         
1082             From Element::attach()
1083
1084         (WebCore::Style::detachShadowRoot):
1085         
1086             From ShadowRoot::detach()
1087
1088         (WebCore::Style::detachChildren):
1089         
1090             From Element::detachChildren()
1091
1092         (WebCore::Style::detachRenderTree):
1093         
1094             From Element::deatach()
1095
1096         (WebCore::Style::reattachRenderTree):
1097         
1098              From Element::reattach()
1099
1100         (WebCore::Style::resolveLocal):
1101         * style/StyleResolveTree.h:
1102         (WebCore::Style::AttachContext::AttachContext):
1103         
1104             From Element::AttachContext
1105
1106         * svg/SVGTests.cpp:
1107         (WebCore::SVGTests::handleAttributeChange):
1108         * xml/XMLErrors.cpp:
1109         (WebCore::XMLErrors::insertErrorMessageBlock):
1110         * xml/parser/XMLDocumentParserLibxml2.cpp:
1111         (WebCore::XMLDocumentParser::startElementNs):
1112
1113 2013-08-18  Antti Koivisto  <antti@apple.com>
1114
1115         Fix crashing plugin tests caused by a logic error in the previous patch.
1116         
1117         Not reviewed.
1118
1119         * html/HTMLPlugInImageElement.cpp:
1120         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
1121
1122 2013-08-18  Antti Koivisto  <antti@apple.com>
1123
1124         <https://webkit.org/b/119982> Make Element::attach non-virtual
1125
1126         Reviewed by Andreas Kling.
1127
1128         This will give us more future refactoring options.
1129
1130         * dom/Element.cpp:
1131         (WebCore::Element::attach):
1132         (WebCore::Element::detach):
1133         
1134             Make non-virtual. Call element type specific custom functions as needed.
1135
1136         (WebCore::Element::styleForRenderer):
1137         (WebCore::Element::willRecalcStyle):
1138         (WebCore::Element::didRecalcStyle):
1139         (WebCore::Element::willAttachRenderers):
1140         (WebCore::Element::didAttachRenderers):
1141         (WebCore::Element::willDetachRenderers):
1142         (WebCore::Element::didDetachRenderers):
1143         
1144             Add virtual custom callbacks.
1145
1146         (WebCore::Element::customStyleForRenderer):
1147         * dom/Element.h:
1148         * dom/Node.h:
1149         (WebCore::Node::pseudoId):
1150         (WebCore::Node::hasCustomStyleResolveCallbacks):
1151         (WebCore::Node::setHasCustomStyleResolveCallbacks):
1152         
1153             Use the existing bit as it largely overlaps. Rename for clarity.
1154
1155         (WebCore::Node::customPseudoId):
1156         * dom/PseudoElement.cpp:
1157         (WebCore::PseudoElement::PseudoElement):
1158         (WebCore::PseudoElement::didAttachRenderers):
1159         * dom/PseudoElement.h:
1160         * html/HTMLCanvasElement.cpp:
1161         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1162         (WebCore::HTMLCanvasElement::willAttachRenderers):
1163         * html/HTMLCanvasElement.h:
1164         * html/HTMLFormControlElement.cpp:
1165         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1166         (WebCore::HTMLFormControlElement::didAttachRenderers):
1167         * html/HTMLFormControlElement.h:
1168         * html/HTMLFrameElement.cpp:
1169         (WebCore::HTMLFrameElement::HTMLFrameElement):
1170         (WebCore::HTMLFrameElement::didAttachRenderers):
1171         * html/HTMLFrameElement.h:
1172         * html/HTMLFrameElementBase.cpp:
1173         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
1174         (WebCore::HTMLFrameElementBase::didAttachRenderers):
1175         * html/HTMLFrameElementBase.h:
1176         * html/HTMLFrameSetElement.cpp:
1177         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
1178         (WebCore::HTMLFrameSetElement::willAttachRenderers):
1179         * html/HTMLFrameSetElement.h:
1180         * html/HTMLIFrameElement.cpp:
1181         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
1182         * html/HTMLImageElement.cpp:
1183         (WebCore::HTMLImageElement::HTMLImageElement):
1184         (WebCore::HTMLImageElement::didAttachRenderers):
1185         * html/HTMLImageElement.h:
1186         * html/HTMLInputElement.cpp:
1187         (WebCore::HTMLInputElement::HTMLInputElement):
1188         (WebCore::HTMLInputElement::willAttachRenderers):
1189         (WebCore::HTMLInputElement::didAttachRenderers):
1190         (WebCore::HTMLInputElement::didDetachRenderers):
1191         * html/HTMLInputElement.h:
1192         * html/HTMLLIElement.cpp:
1193         (WebCore::HTMLLIElement::HTMLLIElement):
1194         (WebCore::HTMLLIElement::didAttachRenderers):
1195         * html/HTMLLIElement.h:
1196         * html/HTMLMediaElement.cpp:
1197         (WebCore::HTMLMediaElement::HTMLMediaElement):
1198         (WebCore::HTMLMediaElement::willAttachRenderers):
1199         (WebCore::HTMLMediaElement::didAttachRenderers):
1200         * html/HTMLMediaElement.h:
1201         * html/HTMLOptGroupElement.cpp:
1202         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
1203         (WebCore::HTMLOptGroupElement::didAttachRenderers):
1204         (WebCore::HTMLOptGroupElement::willDetachRenderers):
1205         * html/HTMLOptGroupElement.h:
1206         * html/HTMLOptionElement.cpp:
1207         (WebCore::HTMLOptionElement::HTMLOptionElement):
1208         (WebCore::HTMLOptionElement::didAttachRenderers):
1209         (WebCore::HTMLOptionElement::willDetachRenderers):
1210         * html/HTMLOptionElement.h:
1211         * html/HTMLPlugInElement.cpp:
1212         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
1213         (WebCore::HTMLPlugInElement::willDetachRenderers):
1214         * html/HTMLPlugInElement.h:
1215         * html/HTMLPlugInImageElement.cpp:
1216         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
1217         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
1218         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
1219         * html/HTMLPlugInImageElement.h:
1220         * html/HTMLProgressElement.cpp:
1221         (WebCore::HTMLProgressElement::HTMLProgressElement):
1222         (WebCore::HTMLProgressElement::didAttachRenderers):
1223         * html/HTMLProgressElement.h:
1224         * html/HTMLTextAreaElement.cpp:
1225         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
1226         (WebCore::HTMLTextAreaElement::didAttachRenderers):
1227         * html/HTMLTextAreaElement.h:
1228         * html/HTMLVideoElement.cpp:
1229         (WebCore::HTMLVideoElement::HTMLVideoElement):
1230         (WebCore::HTMLVideoElement::didAttachRenderers):
1231         * html/HTMLVideoElement.h:
1232         * html/shadow/InsertionPoint.cpp:
1233         (WebCore::InsertionPoint::InsertionPoint):
1234         (WebCore::InsertionPoint::willAttachRenderers):
1235         (WebCore::InsertionPoint::willDetachRenderers):
1236         * html/shadow/InsertionPoint.h:
1237         * html/shadow/SliderThumbElement.cpp:
1238         (WebCore::SliderThumbElement::SliderThumbElement):
1239         (WebCore::SliderThumbElement::willDetachRenderers):
1240         * html/shadow/SliderThumbElement.h:
1241         * html/shadow/SpinButtonElement.cpp:
1242         (WebCore::SpinButtonElement::SpinButtonElement):
1243         (WebCore::SpinButtonElement::willDetachRenderers):
1244         * html/shadow/SpinButtonElement.h:
1245         * html/shadow/TextControlInnerElements.cpp:
1246         (WebCore::TextControlInnerElement::TextControlInnerElement):
1247         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1248         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1249         (WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
1250         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1251         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
1252         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
1253         * html/shadow/TextControlInnerElements.h:
1254         * style/StyleResolveTree.cpp:
1255         (WebCore::Style::resolveTree):
1256         * svg/SVGElement.cpp:
1257         (WebCore::SVGElement::SVGElement):
1258         * svg/SVGImageElement.cpp:
1259         (WebCore::SVGImageElement::SVGImageElement):
1260         (WebCore::SVGImageElement::didAttachRenderers):
1261         * svg/SVGImageElement.h:
1262         * svg/SVGUseElement.cpp:
1263         (WebCore::SVGUseElement::SVGUseElement):
1264
1265 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
1266
1267         https://bugs.webkit.org/show_bug.cgi?id=119972
1268         Add attributes field to PropertySlot
1269
1270         Reviewed by Geoff Garen.
1271
1272         For all JSC types, this makes getOwnPropertyDescriptor redundant.
1273         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
1274         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
1275
1276         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1277         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
1278         * bindings/js/JSDOMWindowCustom.cpp:
1279         (WebCore::JSDOMWindow::getOwnPropertySlot):
1280         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1281         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
1282         * bindings/js/JSHistoryCustom.cpp:
1283         (WebCore::JSHistory::getOwnPropertySlotDelegate):
1284         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
1285         * bindings/js/JSLocationCustom.cpp:
1286         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1287         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
1288         * bindings/js/JSPluginElementFunctions.cpp:
1289         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
1290         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
1291         * bindings/scripts/CodeGeneratorJS.pm:
1292         (GenerateGetOwnPropertySlotBody):
1293         (GenerateGetOwnPropertyDescriptorBody):
1294         (GenerateImplementation):
1295         * bridge/runtime_array.cpp:
1296         (JSC::RuntimeArray::getOwnPropertySlot):
1297         (JSC::RuntimeArray::getOwnPropertyDescriptor):
1298         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
1299         * bridge/runtime_method.cpp:
1300         (JSC::RuntimeMethod::getOwnPropertySlot):
1301         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
1302         * bridge/runtime_object.cpp:
1303         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
1304         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
1305             - Pass attributes to PropertySlot::set* methods.
1306
1307 2013-08-18  Ryosuke Niwa  <rniwa@webkit.org>
1308
1309         <https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
1310
1311         Reviewed by Darin Adler.
1312
1313         Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.
1314
1315         The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
1316         if the first node's renderer didn't exist.
1317
1318         Fixed the bug by obtaining the renderer of the container of the first visible position in the context.
1319
1320         Test: editing/pasteboard/paste-into-textarea-with-new-line.html
1321
1322         * editing/markup.cpp:
1323         (WebCore::contextPreservesNewline):
1324         (WebCore::createFragmentFromText):
1325
1326 2013-08-18  Andreas Kling  <akling@apple.com>
1327
1328         <https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
1329
1330         Reviewed by Antti Koivisto.
1331
1332         * html/HTMLLinkElement.cpp:
1333         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1334
1335 2013-08-18  Andreas Kling  <akling@apple.com>
1336
1337         <https://webkit.org/b/119981> Move ElementData & co to their own files.
1338
1339         Reviewed by Antti Koivisto.
1340
1341         I like to move it move it.
1342
1343 2013-08-18  David Kilzer  <ddkilzer@apple.com>
1344
1345         BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
1346
1347         Fixes the following build failure:
1348
1349             WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
1350             void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
1351                                                                 ^
1352             1 error generated.
1353
1354         * rendering/RenderBlock.cpp:
1355         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
1356         UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.
1357
1358 2013-08-18  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1359
1360         [EFL] minor method name fix for the textTrackOffMenuItemText method
1361         https://bugs.webkit.org/show_bug.cgi?id=119978
1362
1363         the method textTrackOffMenuItemText was renamed in
1364         https://bugs.webkit.org/show_bug.cgi?id=113822
1365
1366         Reviewed by Christophe Dumez.
1367
1368         * platform/efl/LocalizedStringsEfl.cpp:
1369         (WebCore::textTrackOffMenuItemText):
1370
1371 2013-08-17  Antti Koivisto  <antti@apple.com>
1372
1373         <https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement
1374
1375         Reviewed by Andreas Kling.
1376
1377         * dom/StyleElement.cpp:
1378         (WebCore::StyleElement::process):
1379         
1380             Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder 
1381             (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
1382             sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
1383             with > 4GB of style sheet text nodes is probably not going to go well anyway.
1384
1385 2013-08-17  Antti Koivisto  <antti@apple.com>
1386
1387         <https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder
1388
1389         Reviewed by Andreas Kling.
1390
1391         * dom/ScriptElement.cpp:
1392         (WebCore::ScriptElement::scriptContent):
1393         
1394             StringBuilder already optimizes for the single string case. If there is only one the original string is returned.
1395
1396         * dom/Text.cpp:
1397         (WebCore::Text::wholeText):
1398         
1399             No need to traverse twice to compute the capacity. StringBuilder handles this efficiently. 
1400             Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.
1401
1402 2013-08-17  Antti Koivisto  <antti@apple.com>
1403
1404         <https://webkit.org/b/119959> Add TextNodeTraversal
1405
1406         Reviewed by Andreas Kling.
1407
1408         Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
1409         
1410         Use it where appropriate.
1411
1412         * WebCore.xcodeproj/project.pbxproj:
1413         * dom/Attr.cpp:
1414         (WebCore::Attr::childrenChanged):
1415         * dom/NodeTraversal.h:
1416         (WebCore::NodeTraversal::next):
1417         * dom/ScriptElement.cpp:
1418         (WebCore::ScriptElement::scriptContent):
1419         * dom/Text.cpp:
1420         (WebCore::Text::wholeText):
1421         * dom/Text.h:
1422         (WebCore::toText):
1423         * dom/TextNodeTraversal.cpp: Added.
1424         (WebCore::TextNodeTraversal::appendContents):
1425         (WebCore::TextNodeTraversal::contentsAsString):
1426         
1427             Helpers for getting text content of a subtree.
1428
1429         * dom/TextNodeTraversal.h: Added.
1430         (WebCore::TextNodeTraversal::firstTextChildTemplate):
1431         (WebCore::TextNodeTraversal::firstChild):
1432         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
1433         (WebCore::TextNodeTraversal::firstWithin):
1434         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
1435         (WebCore::TextNodeTraversal::next):
1436         (WebCore::TextNodeTraversal::nextSibling):
1437         * editing/ApplyStyleCommand.cpp:
1438         (WebCore::ApplyStyleCommand::joinChildTextNodes):
1439         * html/HTMLTextAreaElement.cpp:
1440         (WebCore::HTMLTextAreaElement::defaultValue):
1441         (WebCore::HTMLTextAreaElement::setDefaultValue):
1442         * html/HTMLTitleElement.cpp:
1443         (WebCore::HTMLTitleElement::text):
1444         * html/track/TextTrackCue.cpp:
1445         (WebCore::TextTrackCue::determineTextDirection):
1446         * page/Frame.cpp:
1447         (WebCore::Frame::searchForLabelsAboveCell):
1448         * xml/XPathUtil.cpp:
1449         (WebCore::XPath::stringValue):
1450
1451 2013-08-17  Andreas Kling  <akling@apple.com>
1452
1453         <https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
1454
1455         Reviewed by Antti Koivisto.
1456
1457         Page::m_contextMenuController is never null.
1458
1459         * page/Page.h:
1460         (WebCore::Page::contextMenuController):
1461
1462 2013-08-17  Andreas Kling  <akling@apple.com>
1463
1464         <https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
1465
1466         Reviewed by Antti Koivisto.
1467
1468         Page::m_dragCaretController is never null.
1469
1470         * dom/Document.cpp:
1471         (WebCore::Document::nodeChildrenWillBeRemoved):
1472         (WebCore::Document::nodeWillBeRemoved):
1473         * page/DragController.cpp:
1474         (WebCore::DragController::cancelDrag):
1475         (WebCore::DragController::dragEnded):
1476         (WebCore::DragController::tryDocumentDrag):
1477         (WebCore::DragController::dispatchTextInputEventFor):
1478         (WebCore::DragController::concludeEditDrag):
1479         (WebCore::DragController::placeDragCaret):
1480         * page/Page.h:
1481         (WebCore::Page::dragCaretController):
1482         * rendering/RenderBlock.cpp:
1483         (WebCore::RenderBlock::paintCaret):
1484
1485 2013-08-17  Andreas Kling  <akling@apple.com>
1486
1487         <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
1488
1489         Reviewed by Antti Koivisto.
1490
1491         Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
1492         has no interest in observing frame destruction since its own destruction will soon follow.
1493
1494         Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
1495
1496 2013-08-17  Andreas Kling  <akling@apple.com>
1497
1498         <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
1499
1500         Reviewed by Antti Koivisto.
1501
1502         This callback was only used by the Chromium port.
1503
1504         * editing/Editor.h:
1505         * editing/Editor.cpp:
1506
1507             Remove override of FrameDestructionObserver::willDetachPage().
1508
1509         * page/EditorClient.h:
1510
1511             Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
1512
1513 2013-08-16  Antti Koivisto  <antti@apple.com>
1514
1515         <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
1516
1517         Reviewed by Darin Adler.
1518
1519         PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
1520         the basic tree consistency (a node is a child node of its parent node).
1521         
1522         This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
1523         impact is negligible as there are not that many ::befores and ::afters.
1524
1525         * dom/ComposedShadowTreeWalker.cpp:
1526         (WebCore::ComposedShadowTreeWalker::traverseParent):
1527         * dom/EventPathWalker.cpp:
1528         (WebCore::EventPathWalker::moveToParent):
1529         * dom/EventRetargeter.h:
1530         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1531         * dom/Node.cpp:
1532         (WebCore::Node::~Node):
1533         
1534             Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
1535
1536         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
1537         * dom/PseudoElement.cpp:
1538         (WebCore::PseudoElement::PseudoElement):
1539         (WebCore::PseudoElement::customStyleForRenderer):
1540         * dom/PseudoElement.h:
1541         (WebCore::toPseudoElement):
1542         
1543             Add casting functions.
1544
1545         * inspector/InspectorLayerTreeAgent.cpp:
1546         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1547         * rendering/HitTestResult.cpp:
1548         (WebCore::HitTestResult::setInnerNode):
1549         (WebCore::HitTestResult::setInnerNonSharedNode):
1550
1551 2013-08-17  Darin Adler  <darin@apple.com>
1552
1553         <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
1554
1555         Reviewed by Andreas Kling.
1556
1557         * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
1558         All three are just unneeded forwarding to pasteboard.
1559         * dom/Clipboard.h: Ditto.
1560
1561         * page/DragController.cpp:
1562         (WebCore::DragController::startDrag): Move the logic in here. Later we might
1563         want to straighten this out a bit, perhaps using functions in Editor, but it's
1564         not much code so fine to just have it here for now.
1565
1566 2013-08-17  Darin Adler  <darin@apple.com>
1567
1568         <https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
1569
1570         Reviewed by Andreas Kling.
1571
1572         * dom/Clipboard.cpp:
1573         (WebCore::Clipboard::Clipboard):
1574         (WebCore::Clipboard::~Clipboard):
1575         * dom/Clipboard.h:
1576         Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
1577         Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.
1578
1579 2013-08-17  Darin Adler  <darin@apple.com>
1580
1581         <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
1582
1583         Reviewed by Andreas Kling.
1584
1585         Later it would be good to move this all to DragController, but there is no reason to have
1586         these functions as member functions of the DOM-exposed Clipboard class.
1587
1588         * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
1589         convertDragOperationToDropZoneOperation.
1590         * dom/Clipboard.h: Ditto.
1591
1592         * page/EventHandler.cpp:
1593         (WebCore::convertDropZoneOperationToDragOperation): Moved here.
1594         (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
1595         (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
1596         canReadTypes check because Clipboard::files already takes care of that.
1597         (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
1598         Added a check for the null string because HashSet::contains will not work on a null string.
1599         (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
1600         (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
1601
1602 2013-08-17  Darin Adler  <darin@apple.com>
1603
1604         <https://webkit.org/b/119943> Clean up the Document class a bit
1605
1606         Reviewed by Antti Koivisto.
1607
1608         * dom/Document.cpp:
1609         (WebCore::Document::~Document): Fixed typo in comment.
1610         (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
1611         Also name local variable just loader rather than documentLoader.
1612         (WebCore::Document::updateTitle): Call loader rather than going indirectly
1613         through frame to get to the loader.
1614         (WebCore::Document::setTitleElement): Fixed formatting (add braces).
1615         (WebCore::Document::removeTitle): Iterate elements instead of nodes.
1616         (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
1617         styleForPage to avoid the need for a simple forwarding function. Also
1618         eliminated local variable to increase clarity.
1619         (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
1620         to call styleForPage to avoid the need for a simple forwarding function.
1621         (WebCore::Document::setIsViewSource): Renamed a local variable.
1622
1623         * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
1624         styleForPage functions.
1625
1626         * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
1627         * loader/FrameLoader.h: Ditto.
1628
1629         * page/PrintContext.cpp:
1630         (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
1631         styleForPage to avoid the need for a simple forwarding function.
1632
1633 2013-08-17  Darin Adler  <darin@apple.com>
1634
1635         <https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
1636
1637         Reviewed by Andreas Kling.
1638
1639         * PlatformWinCE.cmake: Removed EditorWin.cpp.
1640         * WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
1641         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
1642         * WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
1643         ClipboardIOS.mm, and also let Xcode edit/reorder this file.
1644
1645         * editing/Editor.cpp:
1646         (WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
1647         class code. Will remove the rest later.
1648
1649         * editing/Editor.h: Removed declaration of newGeneralClipboard.
1650
1651         * platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
1652         comment to make it clearer.
1653
1654         * platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
1655         * platform/efl/PasteboardEfl.cpp: Ditto.
1656         * platform/ios/PasteboardIOS.mm: Ditto.
1657         * platform/win/PasteboardWin.cpp: Ditto.
1658
1659         * platform/ios/ClipboardIOS.h: Removed. Was an empty file.
1660         * platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
1661         * platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
1662         a function that is never called.
1663
1664 2013-08-17  Darin Adler  <darin@apple.com>
1665
1666         <https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
1667
1668         Reviewed by Andreas Kling.
1669
1670         * dom/Clipboard.h: Removed unused dragLocation member function.
1671         Renamed m_dragLoc to m_dragLocation.
1672
1673         * dom/Clipboard.cpp:
1674         (WebCore::Clipboard::setDragImage):
1675         * platform/gtk/ClipboardGtk.cpp:
1676         (WebCore::Clipboard::createDragImage):
1677         * platform/mac/ClipboardMac.mm:
1678         (WebCore::Clipboard::createDragImage):
1679         * platform/qt/ClipboardQt.cpp:
1680         (WebCore::Clipboard::createDragImage):
1681         * platform/win/ClipboardWin.cpp:
1682         (WebCore::Clipboard::createDragImage):
1683         Updated for new name.
1684
1685 2013-08-17  Darin Adler  <darin@apple.com>
1686
1687         <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
1688
1689         Reviewed by Andreas Kling.
1690
1691         The Element::document is a simpler faster alternative to Element::ownerDocument.
1692         The only behavior difference between the two is that ownerDocument returns 0 when
1693         called on a Document.
1694
1695         * html/HTMLMediaElement.cpp:
1696         (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
1697         (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
1698         document and call to ownerDocument, since ownerDocument will never return non-null
1699         if document returns null.
1700         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
1701         of ownerDocument.
1702
1703         * inspector/DOMEditor.cpp:
1704         (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
1705
1706         * inspector/InspectorCSSAgent.cpp:
1707         (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
1708         (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
1709         (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
1710
1711         * inspector/InspectorDOMAgent.cpp:
1712         (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
1713         does the same thing in a roundabout way.
1714         (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
1715         (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
1716         does the same thing in a roundabout way.
1717
1718         * page/DragController.cpp:
1719         (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
1720
1721         * svg/SVGElementInstance.cpp:
1722         (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
1723
1724 2013-08-17  Darin Adler  <darin@apple.com>
1725
1726         <https://webkit.org/b/119941> Make Page::dragController return a reference
1727
1728         Reviewed by Andreas Kling.
1729
1730         * page/Page.h:
1731         (WebCore::Page::dragController): Return a reference instead of a pointer.
1732
1733         * page/DragController.cpp:
1734         (WebCore::DragController::concludeEditDrag):
1735         * page/EventHandler.cpp:
1736         (WebCore::EventHandler::eventMayStartDrag):
1737         (WebCore::EventHandler::updateDragSourceActionsAllowed):
1738         (WebCore::EventHandler::handleDrag):
1739         * page/mac/EventHandlerMac.mm:
1740         (WebCore::EventHandler::passSubframeEventToSubframe):
1741         Updated call sites.
1742
1743 2013-08-17  Morten Stenshorne  <mstensho@opera.com>
1744
1745         <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
1746
1747         Reviewed by Darin Adler.
1748
1749         Since the flow thread is a direct child of RenderView, it doesn't inherit
1750         proper writing-mode automatically. It should be mentioned that if the thread's
1751         contents' writing-mode differs from that of the first region, things are
1752         typically going to look useless (although perhaps that's how it should be),
1753         but as long as writing-mode is only specified on a common parent of the
1754         thread's contents and the regions, things look fine, and also, we're now
1755         following what the spec has to say on the matter:
1756
1757         http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property
1758
1759             "The first region defines the principal writing mode for the entire flow.
1760              The writing mode on subsequent regions is ignored."
1761
1762         This is a back-port of the fix for Blink bug 257965.
1763         Reviewed by esprehn and mihnea there.
1764         Blink review URL: https://chromiumcodereview.appspot.com/18374008
1765
1766         Tests: fast/regions/changing-writing-mode-2.html
1767                fast/regions/changing-writing-mode-3.html
1768                fast/regions/changing-writing-mode-4.html
1769                fast/regions/changing-writing-mode-5.html
1770                fast/regions/changing-writing-mode.html
1771                fast/regions/invalid-first-region-with-writing-mode-2.html
1772                fast/regions/invalid-first-region-with-writing-mode.html
1773                fast/regions/subtree-with-horiz-bt.html
1774                fast/regions/subtree-with-horiz-tb.html
1775                fast/regions/subtree-with-vert-lr.html
1776                fast/regions/subtree-with-vert-rl.html
1777
1778         * rendering/RenderFlowThread.cpp:
1779         (WebCore::RenderFlowThread::styleDidChange):
1780         * rendering/RenderFlowThread.h:
1781         * rendering/RenderNamedFlowThread.cpp:
1782         (WebCore::RenderNamedFlowThread::updateWritingMode):
1783         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
1784         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1785         (WebCore::RenderNamedFlowThread::regionChangedWritingMode):
1786         * rendering/RenderNamedFlowThread.h:
1787         * rendering/RenderRegion.cpp:
1788         (WebCore::RenderRegion::styleDidChange):
1789
1790 2013-08-16  Andreas Kling  <akling@apple.com>
1791
1792         <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
1793
1794         Reviewed by Geoff Garen.
1795
1796         Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
1797         It now also returns a reference, as it can never be null.
1798
1799         Removed 8.8 million lines of null-checking as a result.
1800
1801 2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
1802
1803         <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
1804
1805         Reviewed by Benjamin Poulain.
1806
1807         Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
1808         the first root editable element exactly once.
1809
1810         * dom/Node.cpp:
1811         (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
1812         when we don't have to check RenderStyle's value.
1813         * editing/htmlediting.cpp:
1814         (WebCore::highestEditableRoot):
1815
1816 2013-08-16  Benjamin Poulain  <benjamin@webkit.org>
1817
1818         Remove a useless #include of SelectorChecker.h
1819
1820         Rubber-stamped by Ryosuke Niwa.
1821
1822         * dom/DocumentStyleSheetCollection.cpp:
1823
1824 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
1825
1826         [Windows] Update RenderMediaControls for new API
1827         https://bugs.webkit.org/show_bug.cgi?id=119910
1828
1829         Reviewed by Eric Carlson.
1830
1831         * rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
1832         the changed API.
1833
1834 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
1835
1836         <https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
1837
1838         Reviewed by Simon Fraser.
1839
1840         No new tests required, just a build fix.
1841
1842         Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
1843         keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
1844
1845         * css/CSSValueKeywords.in:
1846         * css/SVGCSSValueKeywords.in:
1847
1848 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
1849
1850         <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
1851
1852         Reviewed by Alexey Proskuryakov.
1853
1854         WTF::currentTime() is prone to DST changes and NTP adjustments, so use
1855         WTF::monotonicallyIncreasingTime() to measure elapsed time.
1856         
1857         * Modules/filesystem/FileWriter.cpp:
1858         (WebCore::FileWriter::didWrite):
1859         * dom/Document.cpp:
1860         (WebCore::Document::Document):
1861         (WebCore::Document::elapsedTime):
1862         (WebCore::Document::resetLastHandledUserGestureTimestamp):
1863         * dom/Element.cpp:
1864         (WebCore::Element::setActive):
1865         * fileapi/FileReader.cpp:
1866         (WebCore::FileReader::didReceiveData):
1867         * html/HTMLMediaElement.cpp:
1868         (WebCore::HTMLMediaElement::HTMLMediaElement):
1869         (WebCore::HTMLMediaElement::startProgressEventTimer):
1870         (WebCore::HTMLMediaElement::progressEventTimerFired):
1871         (WebCore::HTMLMediaElement::refreshCachedTime):
1872         (WebCore::HTMLMediaElement::invalidateCachedTime):
1873         (WebCore::HTMLMediaElement::currentTime):
1874         (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
1875         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
1876         * html/HTMLMediaElement.h:
1877         * html/HTMLPlugInImageElement.cpp:
1878         (WebCore::documentHadRecentUserGesture):
1879         * html/MediaController.cpp:
1880         (MediaController::scheduleTimeupdateEvent):
1881         * html/parser/HTMLDocumentParser.cpp:
1882         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1883         * html/parser/HTMLParserScheduler.h:
1884         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
1885         * inspector/InspectorCSSAgent.cpp:
1886         (WebCore::SelectorProfile::SelectorProfile):
1887         (WebCore::SelectorProfile::totalMatchingTimeMs):
1888         (WebCore::SelectorProfile::startSelector):
1889         (WebCore::SelectorProfile::commitSelector):
1890         (WebCore::SelectorProfile::commitSelectorTime):
1891         * inspector/InspectorProfilerAgent.cpp:
1892         (WebCore::InspectorProfilerAgent::willProcessTask):
1893         (WebCore::InspectorProfilerAgent::didProcessTask):
1894         * inspector/InspectorTimelineAgent.cpp:
1895         (WebCore::InspectorTimelineAgent::timestamp):
1896         * inspector/TimelineTraceEventProcessor.cpp:
1897         (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
1898         * page/FrameView.cpp:
1899         (WebCore::FrameView::adjustedDeferredRepaintDelay):
1900         (WebCore::FrameView::paintContents):
1901         * platform/ClockGeneric.cpp:
1902         (ClockGeneric::now):
1903         * platform/ScrollAnimatorNone.cpp:
1904         (WebCore::ScrollAnimatorNone::scroll):
1905         (WebCore::ScrollAnimatorNone::animationTimerFired):
1906         * platform/graphics/cg/ImageBufferCG.cpp:
1907         (WebCore::ImageBuffer::ImageBuffer):
1908         (WebCore::ImageBuffer::flushContextIfNecessary):
1909         (WebCore::ImageBuffer::flushContext):
1910         (WebCore::ImageBuffer::copyNativeImage):
1911
1912 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
1913
1914         <https://webkit.org/b/119891> [WinCairo] Compile error.
1915
1916         Reviewed by Brent Fulgham.
1917
1918         * rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
1919         * rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
1920
1921 2013-08-16  Zan Dobersek  <zdobersek@igalia.com>
1922
1923         <https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession
1924
1925         Reviewed by Martin Robinson.
1926
1927         After r154144, a testing NetworkStorageSession is enforced when running the layout tests
1928         through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
1929         objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
1930         as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
1931         NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
1932         As a result, all the layout tests are crashing under WKTR.
1933
1934         * platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
1935         (WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
1936         * platform/network/ResourceHandle.h: Declare the new createTestingSession method.
1937         * platform/network/soup/CookieJarSoup.cpp: 
1938         (WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
1939         provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
1940         jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
1941         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1942         (WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
1943         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
1944         * platform/network/soup/ResourceHandleSoup.cpp:
1945         (WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
1946         SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.
1947
1948 2013-08-16  Pratik Solanki  <psolanki@apple.com>
1949
1950         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
1951
1952         Reviewed by Andreas Kling.
1953
1954         m_script is never NULL so we can just return a reference. Also remove some pointless null
1955         checks as a result of doing this.
1956
1957         * Modules/websockets/WebSocket.cpp:
1958         (WebCore::WebSocket::connect):
1959         * bindings/js/JSDOMWindowBase.cpp:
1960         (WebCore::toJS):
1961         (WebCore::toJSDOMWindow):
1962         * bindings/js/JSDOMWindowShell.cpp:
1963         (WebCore::toJS):
1964         (WebCore::toJSDOMWindowShell):
1965         * bindings/js/JSEventListener.cpp:
1966         (WebCore::JSEventListener::handleEvent):
1967         * bindings/js/JSLazyEventListener.cpp:
1968         (WebCore::JSLazyEventListener::initializeJSFunction):
1969         * bindings/js/PageScriptDebugServer.cpp:
1970         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1971         * bindings/js/ScheduledAction.cpp:
1972         (WebCore::ScheduledAction::execute):
1973         * bindings/js/ScriptCachedFrameData.cpp:
1974         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1975         (WebCore::ScriptCachedFrameData::restore):
1976         * bindings/js/ScriptEventListener.cpp:
1977         (WebCore::createAttributeEventListener):
1978         (WebCore::eventListenerHandlerScriptState):
1979         * bindings/js/ScriptState.cpp:
1980         (WebCore::mainWorldScriptState):
1981         (WebCore::scriptStateFromNode):
1982         (WebCore::scriptStateFromPage):
1983         * bindings/objc/DOM.mm:
1984         (-[DOMNode JSC::Bindings::]):
1985         * bindings/objc/DOMInternal.mm:
1986         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1987         * dom/Document.cpp:
1988         (WebCore::Document::disableEval):
1989         (WebCore::Document::ensurePlugInsInjectedScript):
1990         * dom/ScriptElement.cpp:
1991         (WebCore::ScriptElement::prepareScript):
1992         (WebCore::ScriptElement::executeScript):
1993         * history/CachedFrame.cpp:
1994         (WebCore::CachedFrameBase::restore):
1995         * html/HTMLCanvasElement.cpp:
1996         (WebCore::HTMLCanvasElement::createRenderer):
1997         * html/HTMLElement.cpp:
1998         (WebCore::HTMLElement::rendererIsNeeded):
1999         * html/HTMLMediaElement.cpp:
2000         (WebCore::HTMLMediaElement::controls):
2001         * html/HTMLPlugInElement.cpp:
2002         (WebCore::HTMLPlugInElement::getInstance):
2003         (WebCore::HTMLPlugInElement::getNPObject):
2004         * html/HTMLPlugInImageElement.cpp:
2005         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2006         * html/parser/HTMLParserOptions.cpp:
2007         (WebCore::HTMLParserOptions::HTMLParserOptions):
2008         * inspector/InspectorAgent.cpp:
2009         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
2010         * inspector/InspectorClient.cpp:
2011         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
2012         * inspector/InspectorFrontendClientLocal.cpp:
2013         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
2014         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
2015         * inspector/InspectorOverlay.cpp:
2016         (WebCore::InspectorOverlay::evaluateInOverlay):
2017         * inspector/InspectorPageAgent.cpp:
2018         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2019         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
2020         * inspector/PageRuntimeAgent.cpp:
2021         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
2022         * loader/DocumentWriter.cpp:
2023         (WebCore::DocumentWriter::begin):
2024         * loader/FrameLoader.cpp:
2025         (WebCore::FrameLoader::urlSelected):
2026         (WebCore::FrameLoader::submitForm):
2027         (WebCore::FrameLoader::cancelAndClear):
2028         (WebCore::FrameLoader::clear):
2029         (WebCore::FrameLoader::prepareForCachedPageRestore):
2030         (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
2031         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
2032         * loader/SubframeLoader.cpp:
2033         (WebCore::SubframeLoader::requestFrame):
2034         * loader/cache/CachedResourceLoader.cpp:
2035         (WebCore::CachedResourceLoader::canRequest):
2036         * page/EventSource.cpp:
2037         (WebCore::EventSource::create):
2038         * page/Frame.cpp:
2039         (WebCore::Frame::willDetachPage):
2040         * page/Frame.h:
2041         (WebCore::Frame::script):
2042         * page/Navigator.cpp:
2043         (WebCore::shouldHideFourDot):
2044         * page/Page.cpp:
2045         (WebCore::Page::setDebugger):
2046         * platform/graphics/wince/MediaPlayerProxy.cpp:
2047         (WebCore::WebMediaPlayerProxy::pluginInstance):
2048         (WebCore::WebMediaPlayerProxy::invokeMethod):
2049         * plugins/PluginView.cpp:
2050         (WebCore::PluginView::~PluginView):
2051         (WebCore::PluginView::performRequest):
2052         (WebCore::PluginView::load):
2053         (WebCore::PluginView::bindingInstance):
2054         (WebCore::PluginView::getValue):
2055         * plugins/efl/PluginViewEfl.cpp:
2056         (WebCore::PluginView::platformGetValue):
2057         * xml/XMLHttpRequest.cpp:
2058         (WebCore::XMLHttpRequest::open):
2059         * xml/XMLTreeViewer.cpp:
2060         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
2061
2062 2013-08-16  Andreas Kling  <akling@apple.com>
2063
2064         Attempt to fix the Qt/MountainLion build after r154142.
2065
2066         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2067         (WebCore::MediaPlayerPrivateQt::commitLoad):
2068
2069 2013-08-16  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2070
2071         [Qt] Kerning in fast font path breaks letter-spacing
2072         https://bugs.webkit.org/show_bug.cgi?id=119838
2073
2074         Reviewed by Jocelyn Turcotte.
2075
2076         Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.
2077
2078         Test: fast/text/letter-spacing-kerned.html
2079
2080         * platform/graphics/WidthIterator.h:
2081         (WebCore::WidthIterator::supportsTypesettingFeatures):
2082
2083 2013-08-16  Andreas Kling  <akling@apple.com>
2084
2085         <https://webkit.org/b/119893> FrameView::frame() should return a reference.
2086
2087         Reviewed by Antti Koivisto.
2088
2089         FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
2090         Leave it alone instead, and update the assertion that depended on this behavior.
2091         This enables us to make FrameView::frame() return a Frame&, exposing a ton of
2092         unnecessary null checks.
2093
2094         * history/CachedFrame.cpp:
2095         (WebCore::CachedFrame::destroy):
2096
2097             Remove call to FrameView::clearFrame() that was the only way to get a null
2098             FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
2099             the FrameView would get destroyed anyway.
2100
2101         (WebCore::CachedFrame::clear):
2102
2103             Update an assertion to support the case where the Document's Frame pointer has
2104             been cleared out and CachedFrame is still clinging to the FrameView.
2105
2106         * history/CachedPage.h:
2107
2108             Made CachedPage::destroy() private as it was only called by ~CachedPage().
2109
2110         * /:
2111
2112             Frame* FrameView::frame() => Frame& FrameView::frame()
2113
2114 2013-08-16  Brady Eidson  <beidson@apple.com>
2115
2116         (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
2117         https://bugs.webkit.org/show_bug.cgi?id=119493
2118
2119         Reviewed by Alexey Proskuryakov.
2120
2121         No new tests (Covered by plenty of existing tests).
2122
2123         * WebCore.exp.in:
2124         * WebCore.xcodeproj/project.pbxproj:
2125
2126         * platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public
2127
2128         * platform/network/mac/ResourceHandleMac.mm:
2129         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.
2130
2131 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
2132
2133         <https://webkit.org/b/119889> [WinCairo] Compile error.
2134
2135         Reviewed by Brent Fulgham.
2136
2137         * platform/network/curl/ResourceHandleManager.cpp:
2138         (WebCore::certificatePath): Use correct function name.
2139
2140 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
2141
2142         [Windows] Unreviewed build correction after r154165.
2143
2144         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
2145         to WebKit include location.
2146
2147 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
2148
2149         [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
2150         https://bugs.webkit.org/show_bug.cgi?id=119818
2151
2152         Reviewed by Darin Adler.
2153
2154         Covered by existing: compositing/tiling/empty-to-tiled.html
2155
2156         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2157         (PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
2158         parent layer 
2159
2160 2013-08-16  Andreas Kling  <akling@apple.com>
2161
2162         <https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
2163
2164         Reviewed by Anders Carlsson.
2165
2166         Frame::m_eventHandler is never null.
2167
2168 2013-08-16  Commit Queue  <commit-queue@webkit.org>
2169
2170         Unreviewed, rolling out r153749.
2171         http://trac.webkit.org/changeset/153749
2172         https://bugs.webkit.org/show_bug.cgi?id=119892
2173
2174         The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).
2175
2176         * GNUmakefile.am:
2177
2178 2013-08-16  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
2179
2180         [GTK] fixing localizedString method name
2181         https://bugs.webkit.org/show_bug.cgi?id=119884
2182
2183         The method name defined in LocalizedStringsGtk.cpp doesn't not match
2184         the one used in LocalizedStrings.h
2185
2186         Reviewed by Gustavo Noronha Silva.
2187
2188         * platform/gtk/LocalizedStringsGtk.cpp:
2189         (WebCore::textTrackOffMenuItemText):
2190
2191 2013-08-16  Andrei Parvu  <parvu@adobe.com>
2192
2193         [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
2194         https://bugs.webkit.org/show_bug.cgi?id=119614
2195
2196         Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
2197         luminance. The default value is auto. This patch contains only the parsing of the property,
2198         not the actual implementation of the types of masks. The parsing of mask-source-type in the
2199         -webkit-mask property will be handled in a separate patch.
2200
2201         Reviewed by Dirk Schulze.
2202
2203         Test: fast/masking/parsing-mask-source-type.html
2204
2205         * css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
2206         (WebCore::ComputedStyleExtractor::propertyValue):
2207         * css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
2208         (WebCore::CSSParser::parseValue):
2209         (WebCore::CSSParser::parseFillProperty):
2210         * css/CSSProperty.cpp:
2211         (WebCore::CSSProperty::isInheritedProperty):
2212         * css/CSSPropertyNames.in: Added -webkit-mask-type property.
2213         * css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
2214         (WebCore::CSSToStyleMap::mapFillMaskType):
2215         * css/CSSToStyleMap.h:
2216         * css/DeprecatedStyleBuilder.cpp:
2217         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2218         * css/StyleResolver.cpp:
2219         (WebCore::StyleResolver::applyProperty):
2220         * rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
2221         (WebCore::FillLayer::FillLayer):
2222         (WebCore::FillLayer::operator=):
2223         (WebCore::FillLayer::operator==):
2224         * rendering/style/FillLayer.h: Added methods for working with m_maskType.
2225         (WebCore::FillLayer::maskType):
2226         (WebCore::FillLayer::isMaskTypeSet):
2227         (WebCore::FillLayer::setMaskType):
2228         (WebCore::FillLayer::clearMaskType):
2229         (WebCore::FillLayer::initialMaskType):
2230         * rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
2231
2232 2013-08-16  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2233
2234         <https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
2235
2236         Reviewed by Gyuyoung Kim.
2237
2238         Now that r154109 has landed, all Bison versions (at least from 2.3 up
2239         to the latest 3.0) should be able to generate versions of glslang* that
2240         build correctly.
2241
2242         Since the idea is to remove the prebuilt files from future imports of
2243         ANGLE, always building our own versions is a good idea, and allows us
2244         to get rid of some very ugly CMake checks.
2245
2246         * CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
2247         DERIVED_SOURCES_WEBCORE_DIR.
2248
2249 2013-08-16  Julien Brianceau  <jbrianceau@nds.com>
2250
2251         <https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
2252
2253         Reviewed by Gyuyoung Kim.
2254
2255         Since r154142, Frame::loader() is a reference (and not a pointer anymore).
2256
2257         * xml/parser/XMLDocumentParserQt.cpp:
2258         (WebCore::XMLDocumentParser::parseStartElement):
2259
2260 2013-08-16  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
2261
2262         [WebGL] Vertex attribute binding validation method
2263         https://bugs.webkit.org/show_bug.cgi?id=119515
2264
2265         This patch refactors WebGLRenderingContext code by moving the vertex
2266         attribute binding validation to a separate method. It is now
2267         possible to use that validation in other parts of the code. The
2268         code is more clear now. 
2269
2270         Reviewed by Christophe Dumez.
2271
2272         No new tests. Covered by existing tests. No behaviour changed.
2273         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
2274         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
2275         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
2276
2277         * html/canvas/WebGLRenderingContext.cpp:
2278         (WebCore::WebGLRenderingContext::validateVertexAttributes):
2279         * html/canvas/WebGLVertexArrayObjectOES.h:
2280         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
2281         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
2282
2283 2013-08-15  Antti Koivisto  <antti@apple.com>
2284
2285         <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
2286
2287         Reviewed by Andreas Kling.
2288
2289         Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
2290         pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
2291         want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
2292         traversing through.
2293         
2294         This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
2295         member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
2296         now always null in the root node.
2297         
2298         ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
2299
2300         * css/StyleResolver.cpp:
2301         (WebCore::StyleResolver::pushParentShadowRoot):
2302         (WebCore::StyleResolver::popParentShadowRoot):
2303         * dom/Attr.cpp:
2304         (WebCore::Attr::createTextChild):
2305         * dom/ComposedShadowTreeWalker.cpp:
2306         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
2307         * dom/ContainerNode.cpp:
2308         (WebCore::ContainerNode::insertBeforeCommon):
2309         (WebCore::ContainerNode::removeBetween):
2310         * dom/ContainerNodeAlgorithms.cpp:
2311         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2312         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
2313         * dom/ContainerNodeAlgorithms.h:
2314         (WebCore::appendChildToContainer):
2315         (WebCore::Private::addChildNodesToDeletionQueue):
2316         * dom/Document.h:
2317         (WebCore::Node::Node):
2318         * dom/Element.cpp:
2319         (WebCore::Element::addShadowRoot):
2320         (WebCore::Element::removeShadowRoot):
2321         * dom/ElementRareData.h:
2322         (WebCore::ElementRareData::releasePseudoElement):
2323         * dom/EventPathWalker.cpp:
2324         (WebCore::EventPathWalker::moveToParent):
2325         * dom/EventRetargeter.cpp:
2326         (WebCore::determineDispatchBehavior):
2327         * dom/EventRetargeter.h:
2328         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
2329         * dom/Node.cpp:
2330         (WebCore::Node::shadowHost):
2331         (WebCore::Node::deprecatedShadowAncestorNode):
2332         (WebCore::Node::parentOrShadowHostElement):
2333         * dom/Node.h:
2334         (WebCore::Node::hasTreeSharedParent):
2335         
2336             Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
2337
2338         (WebCore::Node::setParentNode):
2339         (WebCore::Node::parentNode):
2340         (WebCore::Node::parentNodeGuaranteedHostFree):
2341         * dom/PseudoElement.cpp:
2342         (WebCore::PseudoElement::PseudoElement):
2343         * dom/ShadowRoot.cpp:
2344         (WebCore::ShadowRoot::ShadowRoot):
2345         (WebCore::ShadowRoot::setInnerHTML):
2346         (WebCore::ShadowRoot::setApplyAuthorStyles):
2347         (WebCore::ShadowRoot::setResetStyleInheritance):
2348         * dom/ShadowRoot.h:
2349         
2350             Rename host() -> hostElement() for clarity.
2351
2352         (WebCore::Node::parentOrShadowHostNode):
2353         * dom/Text.cpp:
2354         (WebCore::isSVGShadowText):
2355         * dom/TreeScope.cpp:
2356         (WebCore::TreeScope::focusedElement):
2357         * html/shadow/ContentDistributor.cpp:
2358         (WebCore::ContentDistributor::ensureDistribution):
2359         * html/shadow/InsertionPoint.cpp:
2360         (WebCore::InsertionPoint::insertedInto):
2361         (WebCore::InsertionPoint::removedFrom):
2362         (WebCore::InsertionPoint::parseAttribute):
2363         * page/DragController.cpp:
2364         (WebCore::asFileInput):
2365         * page/EventHandler.cpp:
2366         (WebCore::EventHandler::handleMousePressEvent):
2367         (WebCore::instanceAssociatedWithShadowTreeElement):
2368         * page/FocusController.cpp:
2369         (WebCore::FocusNavigationScope::owner):
2370         * rendering/RenderBlock.cpp:
2371         (WebCore::RenderBlock::hasLineIfEmpty):
2372         * rendering/RenderLayer.cpp:
2373         (WebCore::rendererForScrollbar):
2374         * svg/SVGElementInstance.h:
2375         (WebCore::SVGElementInstance::setParentNode):
2376             
2377             Renamed so it works with appendChildToContainer template.
2378
2379         * svg/SVGStyledElement.cpp:
2380         (WebCore::SVGStyledElement::title):
2381
2382 2013-08-13  Darin Adler  <darin@apple.com>
2383
2384         [iOS] Get iOS port off legacy clipboard
2385         https://bugs.webkit.org/show_bug.cgi?id=116412
2386
2387         Reviewed by Daniel Bates.
2388
2389         * dom/Clipboard.h: Turn off legacy style clipboard for iOS.
2390         Next patch will be able to remove legacy style entirely!
2391
2392         * editing/Editor.cpp:
2393         (WebCore::Editor::dispatchCPPEvent): Attach the frame to the
2394         pasteboard directly explicitly. This is a layering violation, but
2395         is needed until we change how iOS pasteboard communicates with the
2396         host to use platform strategies instead of the editor client.
2397
2398         * editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
2399         the include of ClipboardIOS.h.
2400
2401         * platform/Pasteboard.h: Added the setFrame function (iOS-only) and
2402         frame and change count data members.
2403
2404         * platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
2405         * platform/ios/ClipboardIOS.mm: Ditto.
2406
2407         * platform/ios/PasteboardIOS.mm:
2408         (WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
2409         (WebCore::Pasteboard::createForCopyAndPaste): Added.
2410         (WebCore::Pasteboard::createPrivate): Added.
2411         (WebCore::Pasteboard::writePasteboard): Added. Empty function, like
2412         writeClipboard. Eventually need to remove or implement this.
2413         (WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
2414         (WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
2415         (WebCore::utiTypeFromCocoaType): Ditto.
2416         (WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
2417         (WebCore::Pasteboard::clear): Ditto.
2418         (WebCore::Pasteboard::readString): Ditto.
2419         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
2420         (WebCore::Pasteboard::writeString): Ditto.
2421         (WebCore::Pasteboard::types): Ditto.
2422         (WebCore::Pasteboard::readFilenames): Ditto.
2423
2424         * WebCore.exp.in: Move Clipboard destructor from Mac-only section to
2425         common section shared by Mac and iOS.
2426
2427 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
2428
2429         [EFL] Unreviewed build fix after r154142 and r154144.
2430
2431         * platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
2432         (WebCore::printError):
2433         (WebCore::printerNotFoundError):
2434         (WebCore::invalidPageRangeToPrint):
2435
2436 2013-08-15  Hans Muller  <hmuller@adobe.com>
2437
2438         [CSS Shapes] Add support for shape-outside image values
2439         https://bugs.webkit.org/show_bug.cgi?id=119809
2440
2441         Added minimal support for shape-outside image values. A new method that computes
2442         the excluded intervals for a horizontal line segment was added to the RasterIntervals
2443         class. The stub RasterShape getExcludedIntervals() method has been replaced by
2444         one that uses the new method.
2445
2446         Image shapes are represented by a RasterIntervals object, which just encapsulates a
2447         Region object. The new getExcludedIntervals() method computes the excluded intervals
2448         for a horizontal line segment between y1 and y2. To find the excluded intervals we
2449         vertically expand each of the image shape Region's rectangles that fall within the line
2450         segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
2451         rectangles produces a new Region whose horizontal projection defines the excluded intervals.
2452
2453         Reviewed by Alexandru Chiculita.
2454
2455         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
2456                fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
2457
2458         * rendering/shapes/RasterShape.cpp:
2459         (WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
2460         (WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
2461         * rendering/shapes/RasterShape.h:
2462         * rendering/shapes/ShapeOutsideInfo.cpp:
2463         (WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
2464
2465 2013-08-15  Simon Fraser  <simon.fraser@apple.com>
2466
2467         <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
2468
2469         Reviewed by Tim Horton.
2470         
2471         When starting a show on Hulu, there's a layer that gets marked as
2472         opaque because it has a child RenderLayer whose background fills the
2473         compositing layer. That child RenderLayer was recently position:fixed
2474         but outside the viewport, so its viewportConstrainedNotCompositedReason
2475         was set to a non-zero value.
2476         
2477         However, we failed to clear the viewportConstrainedNotCompositedReason
2478         when the layer became non-fixed. This caused painting the opaque
2479         layer to bail in RenderLayer::paintLayer(), leaving garbage.
2480
2481         Test: compositing/contents-opaque/fixed-to-nonfixed.html
2482
2483         * rendering/RenderLayer.cpp:
2484         (WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
2485         * rendering/RenderLayerCompositor.cpp:
2486         (WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
2487         ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
2488
2489 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
2490
2491         [Windows] Consolidate WebKit Bundle Handling
2492         https://bugs.webkit.org/show_bug.cgi?id=119869
2493
2494         Reviewed by Tim Horton.
2495
2496         * WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
2497         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2498         * platform/network/curl/ResourceHandleManager.cpp:
2499         (WebCore::certificatePath): Use correct bundle handling logic.
2500         * platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
2501         new WebCoreBundleWin.cpp file.
2502         * platform/win/WebCoreBundleWin.cpp: Added.
2503         (WebCore::createWebKitBundle):
2504         (WebCore::webKitBundle):
2505         * platform/win/WebCoreBundleWin.h: Added.
2506
2507 2013-08-15  Anders Carlsson  <andersca@apple.com>
2508
2509         <https://webkit.org/b/119859> Frame::loader() should return a reference
2510
2511         Reviewed by Andreas Kling.
2512
2513         * Modules/websockets/WebSocketChannel.cpp:
2514         (WebCore::WebSocketChannel::willOpenSocketStream):
2515         * WebCore.xcodeproj/project.pbxproj:
2516         * accessibility/AccessibilityObject.cpp:
2517         (WebCore::AccessibilityObject::press):
2518         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2519         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
2520         * bindings/ScriptControllerBase.cpp:
2521         (WebCore::ScriptController::canExecuteScripts):
2522         * bindings/js/ScriptController.cpp:
2523         (WebCore::ScriptController::initScript):
2524         * css/CSSFontSelector.cpp:
2525         (WebCore::CSSFontSelector::beginLoadTimerFired):
2526         * dom/DOMImplementation.cpp:
2527         (WebCore::DOMImplementation::createDocument):
2528         * dom/Document.cpp:
2529         (WebCore::Document::Document):
2530         (WebCore::Document::setVisualUpdatesAllowed):
2531         (WebCore::Document::updateTitle):
2532         (WebCore::Document::open):
2533         (WebCore::Document::explicitClose):
2534         (WebCore::Document::implicitClose):
2535         (WebCore::Document::userAgent):
2536         (WebCore::Document::canNavigate):
2537         (WebCore::Document::processHttpEquiv):
2538         (WebCore::Document::referrer):
2539         (WebCore::Document::documentDidResumeFromPageCache):
2540         (WebCore::Document::openSearchDescriptionURL):
2541         (WebCore::Document::finishedParsing):
2542         (WebCore::Document::addIconURL):
2543         (WebCore::Document::initSecurityContext):
2544         (WebCore::Document::updateURLForPushOrReplaceState):
2545         (WebCore::Document::loadEventDelayTimerFired):
2546         (WebCore::Document::loader):
2547         (WebCore::Document::decrementActiveParserCount):
2548         * history/CachedFrame.cpp:
2549         (WebCore::CachedFrameBase::CachedFrameBase):
2550         (WebCore::CachedFrameBase::restore):
2551         (WebCore::CachedFrame::CachedFrame):
2552         (WebCore::CachedFrame::open):
2553         (WebCore::CachedFrame::destroy):
2554         * history/PageCache.cpp:
2555         (WebCore::logCanCacheFrameDecision):
2556         (WebCore::logCanCachePageDecision):
2557         (WebCore::PageCache::canCachePageContainingThisFrame):
2558         (WebCore::PageCache::canCache):
2559         * html/HTMLAnchorElement.cpp:
2560         (WebCore::HTMLAnchorElement::handleClick):
2561         * html/HTMLAppletElement.cpp:
2562         (WebCore::HTMLAppletElement::updateWidget):
2563         * html/HTMLElement.cpp:
2564         (WebCore::HTMLElement::rendererIsNeeded):
2565         * html/HTMLEmbedElement.cpp:
2566         (WebCore::HTMLEmbedElement::updateWidget):
2567         * html/HTMLFormElement.cpp:
2568         (WebCore::HTMLFormElement::prepareForSubmission):
2569         (WebCore::HTMLFormElement::submit):
2570         * html/HTMLFrameElementBase.cpp:
2571         (WebCore::HTMLFrameElementBase::openURL):
2572         * html/HTMLFrameOwnerElement.cpp:
2573         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
2574         * html/HTMLFrameSetElement.cpp:
2575         (WebCore::HTMLFrameSetElement::insertedInto):
2576         (WebCore::HTMLFrameSetElement::removedFrom):
2577         * html/HTMLHtmlElement.cpp:
2578         (WebCore::HTMLHtmlElement::insertedByParser):
2579         * html/HTMLMediaElement.cpp:
2580         (WebCore::HTMLMediaElement::createRenderer):
2581         (WebCore::HTMLMediaElement::attach):
2582         (WebCore::HTMLMediaElement::loadResource):
2583         (WebCore::HTMLMediaElement::getPluginProxyParams):
2584         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
2585         (WebCore::HTMLMediaElement::updateWidget):
2586         (WebCore::HTMLMediaElement::mediaPlayerReferrer):
2587         (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
2588         * html/HTMLObjectElement.cpp:
2589         (WebCore::HTMLObjectElement::parametersForPlugin):
2590         (WebCore::HTMLObjectElement::updateWidget):
2591         * html/HTMLPlugInImageElement.cpp:
2592         (WebCore::HTMLPlugInImageElement::isImageType):
2593         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2594         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
2595         * html/HTMLVideoElement.cpp:
2596         (WebCore::HTMLVideoElement::setDisplayMode):
2597         * html/ImageDocument.cpp:
2598         (WebCore::ImageDocumentParser::appendBytes):
2599         (WebCore::ImageDocumentParser::finish):
2600         (WebCore::ImageDocument::createDocumentStructure):
2601         * html/MediaDocument.cpp:
2602         (WebCore::MediaDocumentParser::createDocumentStructure):
2603         * html/PluginDocument.cpp:
2604         (WebCore::PluginDocumentParser::createDocumentStructure):
2605         (WebCore::PluginDocumentParser::appendBytes):
2606         (WebCore::PluginDocument::detach):
2607         (WebCore::PluginDocument::cancelManualPluginLoad):
2608         * html/canvas/WebGLRenderingContext.cpp:
2609         (WebCore::WebGLRenderingContext::create):
2610         (WebCore::WebGLRenderingContext::loseContextImpl):
2611         (WebCore::WebGLRenderingContext::maybeRestoreContext):
2612         * html/parser/HTMLConstructionSite.cpp:
2613         (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
2614         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
2615         * html/parser/HTMLParserOptions.cpp:
2616         (WebCore::HTMLParserOptions::HTMLParserOptions):
2617         * html/parser/XSSAuditor.cpp:
2618         (WebCore::XSSAuditor::init):
2619         * html/parser/XSSAuditorDelegate.cpp:
2620         (WebCore::XSSAuditorDelegate::generateViolationReport):
2621         (WebCore::XSSAuditorDelegate::didBlockScript):
2622         * inspector/InspectorApplicationCacheAgent.cpp:
2623         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
2624         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2625         * inspector/InspectorFrontendClientLocal.cpp:
2626         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2627         * inspector/InspectorFrontendHost.cpp:
2628         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
2629         * inspector/InspectorOverlay.cpp:
2630         (WebCore::InspectorOverlay::overlayPage):
2631         * inspector/InspectorPageAgent.cpp:
2632         (WebCore::InspectorPageAgent::mainResourceContent):
2633         (WebCore::InspectorPageAgent::reload):
2634         (WebCore::InspectorPageAgent::navigate):
2635         (WebCore::allResourcesURLsForFrame):
2636         (WebCore::InspectorPageAgent::searchInResource):
2637         (WebCore::InspectorPageAgent::assertDocumentLoader):
2638         (WebCore::InspectorPageAgent::buildObjectForFrame):
2639         * inspector/InspectorResourceAgent.cpp:
2640         (WebCore::InspectorResourceAgent::didFailLoading):
2641         * loader/CookieJar.cpp:
2642         (WebCore::networkingContext):
2643         * loader/DocumentLoader.cpp:
2644         (WebCore::DocumentLoader::frameLoader):
2645         (WebCore::DocumentLoader::document):
2646         (WebCore::DocumentLoader::stopLoading):
2647         (WebCore::DocumentLoader::removeSubresourceLoader):
2648         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2649         (WebCore::DocumentLoader::iconLoadDecisionAvailable):
2650         (WebCore::DocumentLoader::continueIconLoadWithDecision):
2651         * loader/DocumentThreadableLoader.cpp:
2652         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2653         (WebCore::DocumentThreadableLoader::didFinishLoading):
2654         (WebCore::DocumentThreadableLoader::didFail):
2655         (WebCore::DocumentThreadableLoader::preflightFailure):
2656         (WebCore::DocumentThreadableLoader::loadRequest):
2657         * loader/DocumentWriter.cpp:
2658         (WebCore::DocumentWriter::replaceDocument):
2659         (WebCore::DocumentWriter::createDocument):
2660         (WebCore::DocumentWriter::begin):
2661         * loader/FrameLoader.cpp:
2662         (WebCore::FrameLoader::~FrameLoader):
2663         (WebCore::FrameLoader::allChildrenAreComplete):
2664         (WebCore::FrameLoader::allAncestorsAreComplete):
2665         (WebCore::FrameLoader::loadURLIntoChildFrame):
2666         (WebCore::FrameLoader::outgoingReferrer):
2667         (WebCore::FrameLoader::setOpener):
2668         (WebCore::FrameLoader::completed):
2669         (WebCore::FrameLoader::started):
2670         (WebCore::FrameLoader::loadFrameRequest):
2671         (WebCore::FrameLoader::loadURL):
2672         (WebCore::FrameLoader::load):
2673         (WebCore::FrameLoader::loadWithDocumentLoader):
2674         (WebCore::FrameLoader::stopAllLoaders):
2675         (WebCore::FrameLoader::closeOldDataSources):
2676         (WebCore::FrameLoader::subframeIsLoading):
2677         (WebCore::FrameLoader::subresourceCachePolicy):
2678         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2679         (WebCore::FrameLoader::detachChildren):
2680         (WebCore::FrameLoader::checkLoadComplete):
2681         (WebCore::FrameLoader::detachFromParent):
2682         (WebCore::FrameLoader::loadPostRequest):
2683         (WebCore::FrameLoader::loadResourceSynchronously):
2684         (WebCore::FrameLoader::shouldClose):
2685         (WebCore::FrameLoader::handleBeforeUnloadEvent):
2686         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2687         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2688         (WebCore::createWindow):
2689         * loader/HistoryController.cpp:
2690         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2691         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2692         (WebCore::HistoryController::saveDocumentState):
2693         (WebCore::HistoryController::saveDocumentAndScrollState):
2694         (WebCore::isAssociatedToRequestedHistoryItem):
2695         (WebCore::HistoryController::restoreDocumentState):
2696         (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
2697         (WebCore::HistoryController::goToItem):
2698         (WebCore::HistoryController::updateForBackForwardNavigation):
2699         (WebCore::HistoryController::updateForReload):
2700         (WebCore::HistoryController::updateForStandardLoad):
2701         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2702         (WebCore::HistoryController::updateForClientRedirect):
2703         (WebCore::HistoryController::updateForCommit):
2704         (WebCore::HistoryController::recursiveUpdateForCommit):
2705         (WebCore::HistoryController::updateForSameDocumentNavigation):
2706         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
2707         (WebCore::HistoryController::initializeItem):
2708         (WebCore::HistoryController::createItemTree):
2709         (WebCore::HistoryController::recursiveSetProvisionalItem):
2710         (WebCore::HistoryController::recursiveGoToItem):
2711         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
2712         (WebCore::HistoryController::updateCurrentItem):
2713         (WebCore::HistoryController::pushState):
2714         (WebCore::HistoryController::replaceState):
2715         * loader/ImageLoader.cpp:
2716         (WebCore::pageIsBeingDismissed):
2717         * loader/MixedContentChecker.cpp:
2718         (WebCore::MixedContentChecker::client):
2719         * loader/NavigationScheduler.cpp:
2720         (WebCore::ScheduledURLNavigation::fire):
2721         (WebCore::ScheduledURLNavigation::didStartTimer):
2722         (WebCore::ScheduledURLNavigation::didStopTimer):
2723         (WebCore::ScheduledRedirect::shouldStartTimer):
2724         (WebCore::ScheduledRedirect::fire):
2725         (WebCore::ScheduledRefresh::fire):
2726         (WebCore::ScheduledHistoryNavigation::fire):
2727         (WebCore::ScheduledFormSubmission::fire):
2728         (WebCore::ScheduledFormSubmission::didStartTimer):
2729         (WebCore::ScheduledFormSubmission::didStopTimer):
2730         (WebCore::NavigationScheduler::mustLockBackForwardList):
2731         (WebCore::NavigationScheduler::scheduleLocationChange):
2732         (WebCore::NavigationScheduler::scheduleFormSubmission):
2733         (WebCore::NavigationScheduler::scheduleRefresh):
2734         (WebCore::NavigationScheduler::schedule):
2735         * loader/PingLoader.cpp:
2736         (WebCore::PingLoader::loadImage):
2737         (WebCore::PingLoader::sendPing):
2738         (WebCore::PingLoader::sendViolationReport):
2739         (WebCore::PingLoader::PingLoader):
2740         * loader/PolicyChecker.cpp:
2741         (WebCore::PolicyChecker::checkNavigationPolicy):
2742         (WebCore::PolicyChecker::checkNewWindowPolicy):
2743         (WebCore::PolicyChecker::checkContentPolicy):
2744         (WebCore::PolicyChecker::cancelCheck):
2745         (WebCore::PolicyChecker::stopCheck):
2746         (WebCore::PolicyChecker::cannotShowMIMEType):
2747         (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
2748         (WebCore::PolicyChecker::continueAfterNavigationPolicy):
2749         (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
2750         (WebCore::PolicyChecker::handleUnimplementablePolicy):
2751         * loader/ProgressTracker.cpp:
2752         (WebCore::ProgressTracker::progressStarted):
2753         (WebCore::ProgressTracker::progressCompleted):
2754         (WebCore::ProgressTracker::finalProgressComplete):
2755         (WebCore::ProgressTracker::incrementProgress):
2756         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
2757         * loader/ResourceLoadNotifier.cpp:
2758         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
2759         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
2760         (WebCore::ResourceLoadNotifier::willSendRequest):
2761         (WebCore::ResourceLoadNotifier::didFailToLoad):
2762         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
2763         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2764         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2765         (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
2766         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
2767         (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
2768         * loader/ResourceLoader.cpp:
2769         (WebCore::ResourceLoader::ResourceLoader):
2770         (WebCore::ResourceLoader::start):
2771         (WebCore::ResourceLoader::frameLoader):
2772         (WebCore::ResourceLoader::willSendRequest):
2773         * loader/SubframeLoader.cpp:
2774         (WebCore::SubframeLoader::pluginIsLoadable):
2775         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
2776         (WebCore::SubframeLoader::createJavaAppletWidget):
2777         (WebCore::SubframeLoader::loadOrRedirectSubframe):
2778         (WebCore::SubframeLoader::loadSubframe):
2779         (WebCore::SubframeLoader::allowPlugins):
2780         (WebCore::SubframeLoader::shouldUsePlugin):
2781         (WebCore::SubframeLoader::loadPlugin):
2782         * loader/appcache/ApplicationCacheGroup.cpp:
2783         (WebCore::ApplicationCacheGroup::selectCache):
2784         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
2785         (WebCore::ApplicationCacheGroup::update):
2786         (WebCore::ApplicationCacheGroup::createResourceHandle):
2787         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2788         (WebCore::ApplicationCacheGroup::didFinishLoading):
2789         (WebCore::ApplicationCacheGroup::didFail):
2790         (WebCore::ApplicationCacheGroup::addEntry):
2791         (WebCore::CallCacheListenerTask::performTask):
2792         (WebCore::ApplicationCacheGroup::postListenerTask):
2793         * loader/appcache/DOMApplicationCache.cpp:
2794         (WebCore::DOMApplicationCache::applicationCacheHost):
2795         * loader/archive/cf/LegacyWebArchive.cpp:
2796         (WebCore::LegacyWebArchive::create):
2797         (WebCore::LegacyWebArchive::createFromSelection):
2798         * loader/cache/CachedResource.cpp:
2799         (WebCore::CachedResource::addAdditionalRequestHeaders):
2800         (WebCore::CachedResource::load):
2801         * loader/cache/CachedResourceLoader.cpp:
2802         (WebCore::CachedResourceLoader::requestImage):
2803         (WebCore::CachedResourceLoader::checkInsecureContent):
2804         (WebCore::CachedResourceLoader::canRequest):
2805         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
2806         (WebCore::CachedResourceLoader::requestResource):
2807         (WebCore::CachedResourceLoader::clientDefersImage):
2808         (WebCore::CachedResourceLoader::cachePolicy):
2809         (WebCore::CachedResourceLoader::loadDone):
2810         * loader/icon/IconController.cpp:
2811         (WebCore::IconController::commitToDatabase):
2812         (WebCore::IconController::startLoader):
2813         (WebCore::IconController::continueLoadWithDecision):
2814         * loader/icon/IconLoader.cpp:
2815         (WebCore::IconLoader::startLoading):
2816         (WebCore::IconLoader::notifyFinished):
2817         * page/Chrome.cpp:
2818         (WebCore::canRunModalIfDuringPageDismissal):
2819         * page/ContextMenuController.cpp:
2820         (WebCore::openNewWindow):
2821         (WebCore::ContextMenuController::contextMenuItemSelected):
2822         (WebCore::ContextMenuController::populate):
2823         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2824         * page/DOMWindow.cpp:
2825         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2826         (WebCore::DOMWindow::postMessageTimerFired):
2827         (WebCore::DOMWindow::close):
2828         (WebCore::DOMWindow::print):
2829         (WebCore::DOMWindow::stop):
2830         (WebCore::DOMWindow::setName):
2831         (WebCore::DOMWindow::opener):
2832         (WebCore::DOMWindow::dispatchLoadEvent):
2833         (WebCore::DOMWindow::setLocation):
2834         (WebCore::DOMWindow::createWindow):
2835         (WebCore::DOMWindow::open):
2836         * page/DOMWindowExtension.cpp:
2837         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
2838         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
2839         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
2840         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
2841         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
2842         * page/DragController.cpp:
2843         (WebCore::DragController::performDrag):
2844         * page/EventHandler.cpp:
2845         (WebCore::EventHandler::handleMousePressEvent):
2846         (WebCore::EventHandler::keyEvent):
2847         * page/Frame.cpp:
2848         (WebCore::Frame::~Frame):
2849         (WebCore::Frame::setView):
2850         (WebCore::Frame::injectUserScripts):
2851         (WebCore::Frame::willDetachPage):
2852         * page/Frame.h:
2853         (WebCore::Frame::loader):
2854         * page/FrameView.cpp:
2855         (WebCore::FrameView::mediaType):
2856         (WebCore::FrameView::setFixedVisibleContentRect):
2857         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
2858         (WebCore::FrameView::performPostLayoutTasks):
2859         (WebCore::FrameView::autoSizeIfEnabled):
2860         (WebCore::FrameView::scrollTo):
2861         (WebCore::FrameView::shouldSuspendScrollAnimations):
2862         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
2863         (WebCore::FrameView::wheelEvent):
2864         (WebCore::FrameView::firePaintRelatedMilestones):
2865         * page/History.cpp:
2866         (WebCore::History::stateInternal):
2867         (WebCore::History::stateObjectAdded):
2868         * page/Location.cpp:
2869         (WebCore::Location::setLocation):
2870         * page/Navigator.cpp:
2871         (WebCore::Navigator::userAgent):
2872         * page/Page.cpp:
2873         (WebCore::Page::goToItem):
2874         (WebCore::Page::refreshPlugins):
2875         (WebCore::Page::setDefersLoading):
2876         (WebCore::Page::setMemoryCacheClientCallsEnabled):
2877         (WebCore::Page::addRelevantRepaintedObject):
2878         * page/Performance.cpp:
2879         (WebCore::Performance::now):
2880         * page/PerformanceNavigation.cpp:
2881         (WebCore::PerformanceNavigation::type):
2882         (WebCore::PerformanceNavigation::redirectCount):
2883         * page/PerformanceResourceTiming.cpp:
2884         (WebCore::monotonicTimeToDocumentMilliseconds):
2885         * page/mac/PageMac.cpp:
2886         (WebCore::Page::addSchedulePair):
2887         (WebCore::Page::removeSchedulePair):
2888         * platform/ios/PasteboardIOS.mm:
2889         (WebCore::documentFragmentWithImageResource):
2890         (WebCore::documentFragmentWithRTF):
2891         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
2892         * platform/mac/HTMLConverter.mm:
2893         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2894         (-[WebHTMLConverter _loadFromDOMRange]):
2895         * platform/mac/PasteboardMac.mm:
2896         (WebCore::documentFragmentWithImageResource):
2897         (WebCore::documentFragmentWithRTF):
2898         (WebCore::fragmentFromWebArchive):
2899         * plugins/DOMMimeType.cpp:
2900         (WebCore::DOMMimeType::enabledPlugin):
2901         * rendering/RenderLayer.cpp:
2902         (WebCore::RenderLayer::scrollTo):
2903         * svg/SVGAElement.cpp:
2904         (WebCore::SVGAElement::defaultEventHandler):
2905         * svg/graphics/SVGImage.cpp:
2906         (WebCore::SVGImage::~SVGImage):
2907         (WebCore::SVGImage::dataChanged):
2908         * testing/Internals.cpp:
2909         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
2910         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
2911         (WebCore::Internals::getReferencedFilePaths):
2912         (WebCore::Internals::forceReload):
2913         * xml/XSLTProcessorLibxslt.cpp:
2914         (WebCore::docLoaderFunc):
2915         * xml/parser/XMLDocumentParserLibxml2.cpp:
2916         (WebCore::openFunc):
2917         (WebCore::XMLDocumentParser::startElementNs):
2918
2919 2013-08-15  Daniel Bates  <dabates@apple.com>
2920
2921         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
2922
2923         Reviewed by David Kilzer.
2924
2925         Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
2926         so as to make it straightforward to merge changes to the WebCore Xcode
2927         project file on WebKit.org with changes to the same file in the iOS tree.
2928
2929         * WebCore.xcodeproj/project.pbxproj:
2930
2931 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
2932
2933         [Windows] Unreviewed build fix after r15417.
2934
2935         * DerivedSources.cpp: Remove classes that now live in JSC.
2936         * WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
2937         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2938         * bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
2939         with Windows 'Unknown' type.
2940         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2941         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2942
2943 2013-08-15  Daniel Bates  <dabates@apple.com>
2944
2945         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
2946
2947         Reviewed by David Kilzer.
2948
2949         * WebCore.xcodeproj/project.pbxproj:
2950         * editing/ios/EditorIOS.mm: Added.
2951         (WebCore::Editor::newGeneralClipboard):
2952         (WebCore::Editor::showFontPanel):
2953         (WebCore::Editor::showStylesPanel):
2954         (WebCore::Editor::showColorPanel):
2955         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2956         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
2957         (WebCore::styleForSelectionStart):
2958         (WebCore::Editor::fontForSelection):
2959         (WebCore::Editor::fontAttributesForSelectionStart):
2960         (WebCore::Editor::removeUnchangeableStyles):
2961
2962 2013-08-15  Dirk Schulze  <krit@webkit.org>
2963
2964         Implement CSS Image filter() function
2965         https://bugs.webkit.org/show_bug.cgi?id=119845
2966
2967         Reviewed by Dean Jackson.
2968
2969         The Filter Effects specification defines a new CSS Image function called
2970         filter(). This function takes another CSS Image as well as a filter function
2971         list as input and can be used by various CSS properties.
2972
2973         Example:
2974
2975             background-image: -webkit-filter(url(image.png), brightness(0.5))
2976
2977         This patch implements the current definition of filter() based on other
2978         image generation classes like CSSCrossfadeValue.
2979         A new class called CSSFilterImageValue was added together with an
2980         image observer.
2981
2982         The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
2983
2984         Tests: fast/filter-image/filter-image.html
2985                fast/filter-image/parse-filter-image.html
2986
2987         * CMakeLists.txt: Added new files to build systems.
2988         * GNUmakefile.list.am:
2989         * Target.pri:
2990         * WebCore.vcxproj/WebCore.vcxproj:
2991         * WebCore.xcodeproj/project.pbxproj:
2992         * css/CSSAllInOne.cpp:
2993         * css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
2994             in CSSImageGeneratorValue.cpp.
2995         (WebCore::CSSCrossfadeValue::isPending):
2996         (WebCore::CSSCrossfadeValue::loadSubimages):
2997         * css/CSSFilterImageValue.cpp: Added.
2998         (WebCore::CSSFilterImageValue::~CSSFilterImageValue):
2999         (WebCore::CSSFilterImageValue::customCssText):
3000         (WebCore::CSSFilterImageValue::fixedSize):
3001         (WebCore::CSSFilterImageValue::isPending):
3002         (WebCore::CSSFilterImageValue::knownToBeOpaque):
3003         (WebCore::CSSFilterImageValue::loadSubimages):
3004         (WebCore::CSSFilterImageValue::image):
3005         (WebCore::CSSFilterImageValue::filterImageChanged):
3006         (WebCore::CSSFilterImageValue::createFilterOperations):
3007         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
3008         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
3009         (WebCore::CSSFilterImageValue::equals):
3010         * css/CSSFilterImageValue.h: Added.
3011         (WebCore::CSSFilterImageValue::create):
3012         (WebCore::CSSFilterImageValue::isFixedSize):
3013         (WebCore::CSSFilterImageValue::CSSFilterImageValue):
3014         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
3015         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
3016         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
3017         * css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
3018             CSSFilterImageValue.
3019         (WebCore::CSSImageGeneratorValue::image):
3020         (WebCore::CSSImageGeneratorValue::isFixedSize):
3021         (WebCore::CSSImageGeneratorValue::fixedSize):
3022         (WebCore::CSSImageGeneratorValue::isPending):
3023         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
3024         (WebCore::CSSImageGeneratorValue::loadSubimages):
3025         (WebCore::CSSImageGeneratorValue::subimageIsPending):
3026         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
3027         * css/CSSImageGeneratorValue.h:
3028         * css/CSSParser.cpp: Added parsing information for new image function.
3029         (WebCore::CSSParser::parseValue):
3030         (WebCore::CSSParser::isGeneratedImageValue):
3031         (WebCore::CSSParser::parseGeneratedImage):
3032         (WebCore::CSSParser::parseFilterImage):
3033         (WebCore::CSSParser::parseFilter):
3034         * css/CSSParser.h:
3035         * css/CSSValue.cpp:
3036         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
3037         (WebCore::CSSValue::equals):
3038         (WebCore::CSSValue::cssText):
3039         (WebCore::CSSValue::destroy):
3040         * css/CSSValue.h:
3041         (WebCore::CSSValue::isFilterImageValue):
3042         * css/StyleResolver.cpp:
3043         (WebCore::StyleResolver::applyProperty):
3044         (WebCore::StyleResolver::generatedOrPendingFromValue):
3045         (WebCore::StyleResolver::createFilterOperations):
3046         * css/StyleResolver.h: StyleResolver needs to be passed to
3047             CSSFilterImageValue in order to resolve blur() and
3048             drop-shadow() function. Both needs to be resolved together
3049             with all other properties and can't be done earlier or later.
3050         * rendering/FilterEffectRenderer.cpp:
3051         (WebCore::FilterEffectRenderer::build): Pass an argument whether the
3052             intermediate filter results should be clipped or not. The filter
3053             property for instance doesn't clip but scales the intermediate
3054             image sizes.
3055         * rendering/FilterEffectRenderer.h:
3056
3057 2013-08-15  Filip Pizlo  <fpizlo@apple.com>
3058
3059         Unreviewed, fix bindings tests after http://trac.webkit.org/changeset/154127
3060
3061         * bindings/scripts/test/JS/JSTestCallback.cpp:
3062         (WebCore::JSTestCallback::callbackWithArrayParam):
3063         * bindings/scripts/test/JS/JSTestCallback.h:
3064         * bindings/scripts/test/JS/JSTestObj.cpp:
3065         (WebCore::setJSTestObjTypedArrayAttr):
3066         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3067         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
3068         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3069         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3070         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
3071         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
3072         * bindings/scripts/test/TestTypedArray.idl: Removed.
3073
3074 2013-08-15  Ryosuke Niwa  <rniwa@webkit.org>
3075
3076         Qt minimum build fix after r154116.
3077
3078         * page/FrameView.cpp:
3079         (WebCore::FrameView::sendResizeEventIfNeeded):
3080
3081 2013-08-14  Filip Pizlo  <fpizlo@apple.com>
3082
3083         Typed arrays should be rewritten
3084         https://bugs.webkit.org/show_bug.cgi?id=119064
3085
3086         Reviewed by Oliver Hunt.
3087
3088         Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
3089         client of them. There is only one layering violation: WebCore installs a
3090         WebCoreTypedArrayController on VM, which makes the
3091         ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
3092         JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
3093         alive but if ArrayBuffer is kept alive from native code then the
3094         JSArrayByffer may die. WebCoreTypedArrayController will keep the
3095         JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
3096         
3097         To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
3098         changed to make most references to wrappers refer to JSObject* rather than
3099         JSDOMWrapper*.
3100         
3101         Array buffer views are now transient; the JS array buffer view wrappers
3102         don't own them or keep them alive. This required a bunch of changes to make
3103         bindings code use RefPtr<ArrayBufferView> to hold onto their views.
3104         
3105         Also there is a bunch of new code to make JSC-provided array buffers and
3106         views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
3107         
3108         Finally, the DataView API is now completely different: the JSDataView
3109         provides the same user-visible JS API but using its own internal magic; the
3110         C++ code that uses DataView now uses a rather different API that is not
3111         aware of usual DOM semantics, since it's in JSC and not WebCore. It's
3112         equally useful for all of WebCore's purposes, but some code had to change
3113         to adapt the new conventions.
3114         
3115         Some tests have been changed or rebased due to changes in behavior, that
3116         bring us into conformance with where the standards are going and allow us to
3117         match Firefox behavior.
3118
3119         Automake work and some additional GTK changes courtesy of
3120         Zan Dobersek <zdobersek@igalia.com>.
3121         
3122         Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
3123
3124         * CMakeLists.txt:
3125         * DerivedSources.make:
3126         * ForwardingHeaders/runtime/DataView.h: Added.
3127         * ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
3128         * ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
3129         * ForwardingHeaders/runtime/JSDataView.h: Added.
3130         * ForwardingHeaders/runtime/JSTypedArrays.h: Added.
3131         * ForwardingHeaders/runtime/TypedArrayController.h: Added.
3132         * ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
3133         * ForwardingHeaders/runtime/TypedArrays.h: Added.
3134         * GNUmakefile.list.am:
3135         * Modules/webaudio/RealtimeAnalyser.h:
3136         * Target.pri:
3137         * UseJSC.cmake:
3138         * WebCore.exp.in:
3139         * WebCore.vcxproj/WebCore.vcxproj:
3140         * WebCore.xcodeproj/project.pbxproj:
3141         * bindings/js/DOMWrapperWorld.h:
3142         * bindings/js/JSArrayBufferCustom.cpp: Removed.
3143         * bindings/js/JSArrayBufferViewHelper.h: Removed.
3144         * bindings/js/JSAudioContextCustom.cpp:
3145         * bindings/js/JSBindingsAllInOne.cpp:
3146         * bindings/js/JSBlobCustom.cpp:
3147         * bindings/js/JSCSSRuleCustom.cpp:
3148         (WebCore::toJS):
3149         * bindings/js/JSCSSValueCustom.cpp:
3150         (WebCore::toJS):
3151         * bindings/js/JSCryptoCustom.cpp:
3152         (WebCore::JSCrypto::getRandomValues):
3153         * bindings/js/JSDOMBinding.h:
3154         (WebCore::wrapperOwner):
3155         (WebCore::wrapperContext):
3156         (WebCore::getInlineCachedWrapper):
3157         (WebCore::setInlineCachedWrapper):
3158         (WebCore::clearInlineCachedWrapper):
3159         (WebCore::getCachedWrapper):
3160         (WebCore::cacheWrapper):
3161         (WebCore::uncacheWrapper):
3162         (WebCore::wrap):
3163         (WebCore::toJS):
3164         (WebCore::toArrayBufferView):
3165         (WebCore::toInt8Array):
3166         (WebCore::toInt16Array):
3167         (WebCore::toInt32Array):
3168         (WebCore::toUint8Array):
3169         (WebCore::toUint8ClampedArray):
3170         (WebCore::toUint16Array):
3171         (WebCore::toUint32Array):
3172         (WebCore::toFloat32Array):
3173         (WebCore::toFloat64Array):
3174         (WebCore::toDataView):
3175         * bindings/js/JSDataViewCustom.cpp: Removed.
3176         * bindings/js/JSDictionary.cpp:
3177         * bindings/js/JSDictionary.h:
3178         * bindings/js/JSDocumentCustom.cpp:
3179         (WebCore::JSDocument::location):
3180         (WebCore::toJS):
3181         * bindings/js/JSEventCustom.cpp:
3182         (WebCore::toJS):
3183         * bindings/js/JSFileReaderCustom.cpp:
3184         * bindings/js/JSHTMLCollectionCustom.cpp:
3185         (WebCore::toJS):
3186         * bindings/js/JSHTMLTemplateElementCustom.cpp:
3187         (WebCore::JSHTMLTemplateElement::content):
3188         * bindings/js/JSImageDataCustom.cpp:
3189         (WebCore::toJS):
3190         * bindings/js/JSInjectedScriptHostCustom.cpp:
3191         * bindings/js/JSMessageEventCustom.cpp:
3192         * bindings/js/JSMessagePortCustom.cpp:
3193         * bindings/js/JSSVGPathSegCustom.cpp:
3194         (WebCore::toJS):
3195         * bindings/js/JSStyleSheetCustom.cpp:
3196         (WebCore::toJS):
3197         * bindings/js/JSTrackCustom.cpp:
3198         (WebCore::toJS):
3199         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3200         * bindings/js/JSXMLHttpRequestCustom.cpp:
3201         (WebCore::JSXMLHttpRequest::send):
3202         * bindings/js/SerializedScriptValue.cpp:
3203         (WebCore::SerializedScriptValue::transferArrayBuffers):
3204         * bindings/js/WebCoreJSClientData.h:
3205         (WebCore::initNormalWorldClientData):
3206         * bindings/js/WebCoreTypedArrayController.cpp: Added.
3207         (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
3208         (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
3209         (WebCore::WebCoreTypedArrayController::toJS):
3210         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
3211         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
3212         * bindings/js/WebCoreTypedArrayController.h: Added.
3213         (WebCore::WebCoreTypedArrayController::wrapperOwner):
3214         * bindings/scripts/CodeGenerator.pm:
3215         (ForAllParents):
3216         (ParseInterface):
3217         (SkipIncludeHeader):
3218         (IsTypedArrayType):
3219         (IsWrapperType):
3220         * bindings/scripts/CodeGeneratorJS.pm:
3221         (AddIncludesForType):
3222         (GenerateHeader):
3223         (GenerateImplementation):
3224         (GenerateParametersCheck):
3225         (GetNativeType):
3226         (JSValueToNative):
3227         (NativeToJSValue):
3228         (GenerateConstructorDefinition):
3229         (GenerateConstructorHelperMethods):
3230         * fileapi/WebKitBlobBuilder.cpp:
3231         (WebCore::BlobBuilder::append):
3232         * fileapi/WebKitBlobBuilder.h:
3233         * html/canvas/ArrayBuffer.idl: Removed.
3234         * html/canvas/ArrayBufferView.idl: Removed.
3235         * html/canvas/DataView.cpp: Removed.
3236         * html/canvas/DataView.h: Removed.
3237         * html/canvas/DataView.idl: Removed.
3238         * html/canvas/Float32Array.idl: Removed.
3239         * html/canvas/Float64Array.idl: Removed.
3240         * html/canvas/Int16Array.idl: Removed.
3241         * html/canvas/Int32Array.idl: Removed.
3242         * html/canvas/Int8Array.idl: Removed.
3243         * html/canvas/Uint16Array.idl: Removed.
3244         * html/canvas/Uint32Array.idl: Removed.
3245         * html/canvas/Uint8Array.idl: Removed.
3246         * html/canvas/Uint8ClampedArray.idl: Removed.
3247         * html/canvas/WebGLRenderingContext.cpp:
3248         (WebCore::WebGLRenderingContext::readPixels):
3249         (WebCore::WebGLRenderingContext::validateTexFuncData):
3250         * page/Crypto.cpp:
3251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3252         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
3253         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
3254         * platform/graphics/filters/FECustomFilter.h:
3255         * platform/graphics/filters/FEGaussianBlur.cpp:
3256         * platform/graphics/filters/FilterEffect.cpp:
3257         * testing/MockCDM.cpp:
3258
3259 2013-08-15  Chris Fleizach  <cfleizach@apple.com>
3260
3261         <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
3262
3263         Reviewed by Darin Adler.
3264
3265         Incorporate review feedback from Darin.
3266
3267         * accessibility/AccessibilityScrollView.cpp:
3268         (WebCore::AccessibilityScrollView::canSetFocusAttribute):
3269         (WebCore::AccessibilityScrollView::isFocused):
3270         * accessibility/AccessibilityScrollView.h:
3271
3272 2013-08-15  Andreas Kling  <akling@apple.com>
3273
3274         <https://webkit.org/b/119826> Page::focusController() should return a reference.
3275
3276         Reviewed by Anders Carlsson.
3277
3278         Page::focusController() is never null so make it return a reference.
3279         Some unnecessary checks were removed as a result.
3280
3281 2013-08-15  Rob Buis  <rwlbuis@webkit.org>
3282
3283         ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
3284         https://bugs.webkit.org/show_bug.cgi?id=116979
3285
3286         Reviewed by Alexey Proskuryakov.
3287
3288         Make constructors private since only ::create should use them.
3289
3290         * html/shadow/MeterShadowElement.h:
3291         * html/shadow/ProgressShadowElement.h:
3292
3293 2013-08-15  Tim Horton  <timothy_horton@apple.com>
3294
3295         FrameView should have an isMainFrameView()
3296         https://bugs.webkit.org/show_bug.cgi?id=119435
3297
3298         Reviewed by Simon Fraser.
3299
3300         No new tests, just refactoring.
3301
3302         * page/FrameView.cpp:
3303         (WebCore::FrameView::FrameView):
3304         (WebCore::FrameView::isMainFrameView):
3305         (WebCore::FrameView::setFrameRect):
3306         (WebCore::FrameView::createScrollbar):
3307         (WebCore::FrameView::applyOverflowToViewport):
3308         (WebCore::FrameView::setHeaderHeight):
3309         (WebCore::FrameView::setFooterHeight):
3310         (WebCore::FrameView::minimumScrollPosition):
3311         (WebCore::FrameView::maximumScrollPosition):
3312         (WebCore::FrameView::performPostLayoutTasks):
3313         (WebCore::FrameView::sendResizeEventIfNeeded):
3314         (WebCore::FrameView::pagination):
3315         (WebCore::FrameView::visibleContentScaleFactor):
3316         (WebCore::FrameView::setVisibleScrollerThumbRect):
3317         (WebCore::FrameView::scrollbarStyleChanged):
3318         (WebCore::FrameView::paintScrollCorner):
3319         (WebCore::FrameView::paintScrollbar):
3320         (WebCore::FrameView::paintOverhangAreas):
3321         * page/FrameView.h:
3322         Add isMainFrameView and adopt it wherever we were previously checking if
3323         the FrameView's frame was the same as its page's main frame.
3324
3325 2013-08-15  Andy Estes  <aestes@apple.com>
3326
3327         <https://webkit.org/b/119853> REGRESSION (r139343): WebKit crashes when canceling a load inside webView:resource:didFinishLoadingFromDataSource:
3328
3329         Reviewed by Brady Eidson.
3330
3331         A client implementing webView:resource:didFinishLoadingFromDataSource:
3332         might decide to call stopLoading: for the identifier that just finished
3333         loading. If this happens we re-enter the loader and attempt to cancel a
3334         load that has already finished and been removed from the set of active
3335         loaders. Prevent this by clearing DocumentLoader's
3336         m_identifierForLoadWithoutResourceLoader before calling
3337         dispatchDidFinishLoading().
3338
3339         New API test: WebKit1.StopLoadingFromDidFinishLoading.
3340
3341         * loader/DocumentLoader.cpp:
3342         (WebCore::DocumentLoader::finishedLoading): Set
3343         m_identifierForLoadWithoutResourceLoader to 0 before calling
3344         dispatchDidFinishLoading().
3345
3346 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
3347
3348         [Mac] Remove "legacy" media UI
3349         https://bugs.webkit.org/show_bug.cgi?id=119752
3350
3351         Reviewed by Jer Noble.
3352
3353         * WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
3354
3355         * platform/mac/WebCoreSystemInterface.h: Update for API change.
3356         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3357
3358         * rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
3359         * rendering/RenderThemeMac.mm:
3360         (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
3361         (WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
3362         (WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
3363             the current theme.
3364         (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
3365         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
3366         (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
3367         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
3368         (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
3369         (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
3370         (WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
3371         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
3372         (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
3373         (WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
3374         (WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
3375         (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
3376         (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
3377         (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
3378         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
3379         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
3380         (WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
3381         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
3382         (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
3383
3384 2013-08-15  Antti Koivisto  <antti@apple.com>
3385
3386         <https://webkit.org/b/119834> Remove ElementShadow
3387
3388         Reviewed by Anders Carlsson.
3389
3390         It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
3391
3392         * CMakeLists.txt:
3393         * GNUmakefile.list.am:
3394         * Target.pri:
3395         * WebCore.exp.in:
3396         * WebCore.xcodeproj/project.pbxproj:
3397         * css/StyleResolver.cpp:
3398         (WebCore::StyleResolver::locateCousinList):
3399         * css/StyleScopeResolver.cpp:
3400         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
3401         (WebCore::StyleScopeResolver::matchHostRules):
3402         * dom/ComposedShadowTreeWalker.cpp:
3403         (WebCore::nodeCanBeDistributed):
3404         (WebCore::ComposedShadowTreeWalker::traverseChild):
3405         * dom/ContainerNode.cpp:
3406         (WebCore::childAttachedAllowedWhenAttachingChildren):
3407         * dom/ContainerNodeAlgorithms.cpp:
3408         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3409         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3410         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
3411         (WebCore::assertConnectedSubrameCountIsConsistent):
3412         * dom/ContainerNodeAlgorithms.h:
3413         (WebCore::ChildFrameDisconnector::collectFrameOwners):
3414         * dom/DOMAllInOne.cpp:
3415         * dom/Document.cpp:
3416         * dom/Element.cpp:
3417         (WebCore::Element::~Element):
3418         (WebCore::Element::attach):
3419         (WebCore::Element::detach):
3420         (WebCore::Element::shadowRoot):
3421         (WebCore::Element::didAffectSelector):
3422         (WebCore::Element::addShadowRoot):
3423         (WebCore::Element::removeShadowRoot):
3424         
3425             Move addShadowRoot and removeShadowRoot here from ElementShadow.
3426
3427         (WebCore::Element::createShadowRoot):
3428         (WebCore::Element::authorShadowRoot):
3429         (WebCore::Element::userAgentShadowRoot):
3430         (WebCore::Element::ensureUserAgentShadowRoot):
3431         (WebCore::Element::childrenChanged):
3432         (WebCore::Element::removeAllEventListeners):
3433         * dom/Element.h:
3434         (WebCore::isShadowHost):
3435         * dom/ElementRareData.h:
3436         (WebCore::ElementRareData::clearShadowRoot):
3437         (WebCore::ElementRareData::shadowRoot):
3438         (WebCore::ElementRareData::setShadowRoot):
3439         (WebCore::ElementRareData::~ElementRareData):
3440         * dom/ElementShadow.cpp: Removed.
3441         * dom/ElementShadow.h: Removed.
3442         * dom/EventDispatcher.cpp:
3443         * dom/EventPathWalker.cpp:
3444         (WebCore::EventPathWalker::moveToParent):
3445         * dom/Node.cpp: