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