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