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