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