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