2011-04-09 Jon Lee <jonlee@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-09  Jon Lee  <jonlee@apple.com>
2
3         Reviewed by Beth Dakin.
4
5         Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
6         https://bugs.webkit.org/show_bug.cgi?id=58180
7         <rdar://problem/9047984>
8
9         * platform/mac/ScrollAnimatorMac.mm:
10         (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
11         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
12         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
13
14 2011-04-09  Sreeram Ramachandran  <sreeram@google.com>
15
16         Reviewed by Ryosuke Niwa.
17
18         Gather data on modal dialogs shown during unload events
19         https://bugs.webkit.org/show_bug.cgi?id=58115
20
21         Add a new method to the ChromeClient API to allow clients to receive
22         notifications of modal dialogs dispatched during page dismissal events.
23         The new method has a default empty definition; only chromium overrides
24         it to keep track of histograms.
25
26         No tests because this is a no-op for all ports except chromium (and it's
27         not clear how to test chromium histograms from webkit).
28
29         * page/Chrome.cpp:
30         (WebCore::isDuringPageDismissal):
31         (WebCore::willRunModalDialog):
32         (WebCore::Chrome::runJavaScriptAlert):
33         (WebCore::Chrome::runJavaScriptConfirm):
34         (WebCore::Chrome::runJavaScriptPrompt):
35         (WebCore::Chrome::willRunModalHTMLDialog):
36         * page/Chrome.h:
37         * page/ChromeClient.h:
38         (WebCore::ChromeClient::willRunModalDialogDuringPageDismissal):
39         * page/DOMWindow.cpp:
40         (WebCore::DOMWindow::showModalDialog):
41
42 2011-04-08  David Humphrey  <david.humphrey@senecac.on.ca>
43
44         Reviewed by Eric Carlson.
45
46         Fix call order of media element muted and play(), such that setting muted before play() works.
47         https://bugs.webkit.org/show_bug.cgi?id=57673
48         https://code.google.com/p/chromium/issues/detail?id=70777
49
50         Manual test added: manual-tests/media-muted.html
51
52         * html/HTMLMediaElement.cpp:
53         (WebCore::HTMLMediaElement::updatePlayState):
54         * manual-tests/media-muted.html: Added.
55
56 2011-04-08  Nat Duca  <nduca@chromium.org>
57
58         Reviewed by David Levin.
59
60         [chromium] Fix windows assertion on ~CCThread
61         https://bugs.webkit.org/show_bug.cgi?id=58153
62
63         Because ~CCThread uses waitForThreadCompletion,
64         calling detachThread is not necessary.
65
66         * platform/graphics/chromium/cc/CCThread.cpp:
67         (WebCore::CCThread::runLoop):
68
69 2011-04-08  Jian Li  <jianli@chromium.org>
70
71         Unreviewed, rolling out r83348.
72         http://trac.webkit.org/changeset/83348
73         https://bugs.webkit.org/show_bug.cgi?id=49508
74
75         Breaks layout tests in QT, Win7 and Chromium.
76
77         * rendering/RenderText.cpp:
78         (WebCore::RenderText::localCaretRect):
79
80 2011-04-08  MORITA Hajime  <morrita@google.com>
81
82         Reviewed by Simon Fraser.
83
84         Negative spread should not make a sharp corner rounded
85         https://bugs.webkit.org/show_bug.cgi?id=58162
86
87         Handled inset shadow path for rounded and non-rounded rect
88         differently as normal shadow path is doing.
89         
90         * rendering/RenderBoxModelObject.cpp:
91         (WebCore::RenderBoxModelObject::paintBoxShadow):
92
93 2011-04-07  Simon Fraser  <simon.fraser@apple.com>
94
95         Reviewed by Martin Robinson.
96
97         REGRESSION (r77034-r77220): CSS box-shadow no longer renders on PowerPC
98         https://bugs.webkit.org/show_bug.cgi?id=55180
99
100         The endianness #ifdef in ShadowBlur was unnecessary and harmful. The
101         data we get back from ImageBuffer::getImageData() do not vary in
102         endianness.
103
104         * platform/graphics/ShadowBlur.cpp:
105         (WebCore::ShadowBlur::blurLayerImage):
106
107 2011-04-08  Erik Arvidsson  <arv@chromium.org>
108
109         Reviewed by Dimitri Glazkov.
110
111         IFrame is getting the focus even though it is hidden
112         https://bugs.webkit.org/show_bug.cgi?id=55861
113
114         Test: fast/dom/hidden-iframe-no-focus.html
115
116         * html/HTMLFrameOwnerElement.cpp:
117         (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
118         * html/HTMLFrameOwnerElement.h:
119
120 2011-04-08  Jeff Timanus  <twiz@chromium.org>
121
122         Reviewed by Kenneth Russell.
123
124         Fall back to software rendering for Canvas2D when requesting a DrawingBuffer larger than supported by the GL environment.
125         https://bugs.webkit.org/show_bug.cgi?id=57768
126
127         * html/canvas/CanvasRenderingContext2D.cpp:
128         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
129         (WebCore::CanvasRenderingContext2D::reset):
130         * platform/graphics/gpu/DrawingBuffer.cpp:
131         (WebCore::DrawingBuffer::reset):
132         * platform/graphics/gpu/DrawingBuffer.h:
133
134 2011-04-08  Daniel Cheng  <dcheng@chromium.org>
135
136         Reviewed by Dmitry Titov.
137
138         [chromium] Implement image/png support in DataTransferItems
139         https://bugs.webkit.org/show_bug.cgi?id=58106
140
141         This patch implements DataTransferItem::getAsFile() using Blobs. In
142         addition, plumbing for image/png has been added so image paste will be
143         supported as long as the renderer makes that data available.
144
145         Tests: editing/pasteboard/data-transfer-items-image-png.html
146
147         * dom/DataTransferItem.h:
148         * dom/DataTransferItem.idl:
149         * platform/chromium/ClipboardMimeTypes.cpp:
150         * platform/chromium/ClipboardMimeTypes.h:
151         * platform/chromium/DataTransferItemChromium.cpp:
152         (WebCore::DataTransferItemChromium::getAsString):
153         (WebCore::DataTransferItemChromium::getAsFile):
154         * platform/chromium/DataTransferItemChromium.h:
155         * platform/chromium/PlatformBridge.h:
156
157 2011-04-08 MORITA Hajime  <morrita@google.com>
158
159         Unreviewed windows build fix.
160         
161         * editing/SpellingCorrectionController.h:
162         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
163
164 2011-04-08  Enrica Casucci  <enrica@apple.com>
165
166         Reviewed by Maciej Stachowiak.
167
168         Improve lifetime management of nodes in ReplaceNodeWithSpanCommand.
169         https://bugs.webkit.org/show_bug.cgi?id=57595
170         <rdar://problem/9222122>
171
172         Test: editing/style/bold-with-dom-changes.html
173
174         * editing/ReplaceNodeWithSpanCommand.cpp:
175         (WebCore::swapInNodePreservingAttributesAndChildren):
176
177 2011-04-07  Roland Steiner  <rolandsteiner@chromium.org>
178
179         Reviewed by Dimitri Glazkov.
180
181         Bug 58060 - Prepare access to TreeScope from Node, using NodeRareData
182         https://bugs.webkit.org/show_bug.cgi?id=58060
183
184         Add a TreeScope pointer to NodeRareData to allow direct access to the containing tree scope.
185         However, in case the containing scope is the document, this is not set, and the
186         document pointer within Node is used instead.
187
188         In an object derived from TreeScope (currently Document), the tree scope pointer
189         points to itself. Such objects also contain a parent tree scope pointer that
190         points to the containing scope. For Document, this is 0.
191
192         Add new functions setTreeScope[Recursively] that replace setDocument[Recursively]
193         in public usage. setDocument[Recursively] are now only used internally and are
194         thererfore protected.
195
196         No new tests. (no new functionality)
197
198         * dom/ContainerNode.cpp: change DOM manipulation methods to update scope of inserted nodes
199         (WebCore::ContainerNode::insertBefore):
200         (WebCore::ContainerNode::replaceChild):
201         (WebCore::ContainerNode::appendChild):
202         * dom/Document.cpp:
203         (WebCore::Document::~Document):
204         (WebCore::Document::setDocType): Ditto
205         (WebCore::Document::adoptNode): Ditto
206         * dom/Document.h:
207         * dom/Node.cpp:
208         (WebCore::Node::treeScope): use NodeRareData to check if a non-Document scope is set
209         (WebCore::Node::setTreeScope): update NodeRareData depending on whether scope is a document
210         (WebCore::Node::setTreeScopeRecursively):
211         (WebCore::Node::setDocumentRecursively):
212         * dom/Node.h:
213         * dom/NodeRareData.h: add scope pointer
214         (WebCore::NodeRareData::NodeRareData):
215         (WebCore::NodeRareData::treeScope):
216         (WebCore::NodeRareData::setTreeScope):
217         * dom/TreeScope.cpp: add parentTreeScope pointer
218         (WebCore::TreeScope::TreeScope):
219         (WebCore::TreeScope::setParentTreeScope):
220         * dom/TreeScope.h:
221         (WebCore::TreeScope::parentTreeScope):
222
223 2011-04-08  Xiaomei Ji  <xji@chromium.org>
224
225         Reviewed by David Hyatt.
226
227         Local caret rectangle calculation should be relative to its containing block.
228         https://bugs.webkit.org/show_bug.cgi?id=49508.
229
230         InlineBox and caret rectangle are positioned relative to its containing block.
231         So its left and right edge value should be relative to its containing block as well. 
232
233         Test: fast/forms/cursor-at-editable-content-boundary.html
234
235         * rendering/RenderText.cpp:
236         (WebCore::RenderText::localCaretRect):
237
238 2011-04-08  MORITA Hajime  <morrita@google.com>
239
240         Unreviewed build fix.
241
242         * editing/Editor.cpp:
243         (WebCore::Editor::markMisspellingsAfterTypingToWord):
244
245 2011-04-08  David Hyatt  <hyatt@apple.com>
246
247         Reviewed by Simon Fraser.
248
249         https://bugs.webkit.org/show_bug.cgi?id=57971
250         
251         Rework visited/unvisited links for before/after content. Propagate the bits earlier so that we don't lose
252         them when we throw away the visited style. Don't throw away the visited link style for pseudo elements
253         either, so that the styles are consistent.
254
255         Added fast/history/visited-generated-content-test.html
256
257         * css/CSSStyleSelector.cpp:
258         (WebCore::CSSStyleSelector::styleForElement):
259         (WebCore::CSSStyleSelector::pseudoStyleForElement):
260
261 2011-04-06  MORITA Hajime  <morrita@google.com>
262
263         Reviewed by Darin Adler.
264
265         [Refactoring] Auto correction panel should be handled by its own class.
266         https://bugs.webkit.org/show_bug.cgi?id=55571
267
268         Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
269         SpellingCorrectionController class.
270         This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
271         code paths inside the never reached without autocorrection support.
272         Removing guards reduces unintentional build breakage.
273
274         No new tests, no behavior chagne.
275
276         * CMakeLists.txt:
277         * GNUmakefile.am:
278         * WebCore.gypi:
279         * WebCore.pro:
280         * WebCore.vcproj/WebCore.vcproj:
281         * WebCore.xcodeproj/project.pbxproj:
282         * editing/CorrectionPanelInfo.h: Removed.
283         * editing/EditingAllInOne.cpp:
284         * editing/Editor.cpp:
285         (WebCore::Editor::respondToChangedSelection):
286         (WebCore::Editor::respondToChangedContents):
287         (WebCore::Editor::appliedEditing):
288         (WebCore::Editor::Editor):
289         (WebCore::Editor::~Editor):
290         (WebCore::Editor::insertTextWithoutSendingTextEvent):
291         (WebCore::Editor::insertLineBreak):
292         (WebCore::Editor::insertParagraphSeparator):
293         (WebCore::Editor::cut):
294         (WebCore::Editor::paste):
295         (WebCore::Editor::pasteAsPlainText):
296         (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
297         (WebCore::Editor::markMisspellingsAfterTypingToWord):
298         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
299         (WebCore::Editor::changeBackToReplacedString):
300         (WebCore::Editor::unappliedSpellCorrection):
301         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
302         (WebCore::Editor::startCorrectionPanelTimer):
303         (WebCore::Editor::handleCorrectionPanelResult):
304         (WebCore::Editor::dismissCorrectionPanelAsIgnored):
305         * editing/Editor.h:
306         * editing/SpellingCorrectionCommand.cpp:
307         * editing/SpellingCorrectionController.cpp: Added.
308         (WebCore::markerTypesForAutocorrection):
309         (WebCore::markerTypesForReplacement):
310         (WebCore::markersHaveIdenticalDescription):
311         (WebCore::SpellingCorrectionController::SpellingCorrectionController):
312         (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
313         (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
314         (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
315         (WebCore::SpellingCorrectionController::stopPendingCorrection):
316         (WebCore::SpellingCorrectionController::applyPendingCorrection):
317         (WebCore::SpellingCorrectionController::hasPendingCorrection):
318         (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
319         (WebCore::SpellingCorrectionController::show):
320         (WebCore::SpellingCorrectionController::handleCancelOperation):
321         (WebCore::SpellingCorrectionController::dismiss):
322         (WebCore::SpellingCorrectionController::dismissSoon):
323         (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
324         (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
325         (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
326         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
327         (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
328         (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
329         (WebCore::SpellingCorrectionController::windowRectForRange):
330         (WebCore::SpellingCorrectionController::respondToChangedSelection):
331         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
332         (WebCore::SpellingCorrectionController::client):
333         (WebCore::SpellingCorrectionController::textChecker):
334         (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
335         (WebCore::SpellingCorrectionController::markReversed):
336         (WebCore::SpellingCorrectionController::markCorrection):
337         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
338         * editing/SpellingCorrectionController.h: Added.
339         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
340         (WebCore::SpellingCorrectionController::shouldStartTimeFor):
341         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):        
342         * editing/TypingCommand.cpp:
343         (WebCore::TypingCommand::insertText):
344         (WebCore::TypingCommand::markMisspellingsAfterTyping):
345         (WebCore::TypingCommand::deleteKeyPressed):
346         (WebCore::TypingCommand::forwardDeleteKeyPressed):
347         * editing/htmlediting.h:
348         (WebCore::isAmbiguousBoundaryCharacter):
349         * page/EditorClient.h:
350         * page/Frame.cpp:
351         (WebCore::Frame::setPageAndTextZoomFactors):
352
353 2011-04-08  Alpha Lam  <hclam@chromium.org>
354
355         Unreviewed, rolling out r83335.
356         http://trac.webkit.org/changeset/83335
357         https://bugs.webkit.org/show_bug.cgi?id=53556
358
359         GTK and QT bots are broken
360
361         * CMakeLists.txt:
362         * Configurations/FeatureDefines.xcconfig:
363         * DerivedSources.make:
364         * GNUmakefile.am:
365         * WebCore.gypi:
366         * WebCore.xcodeproj/project.pbxproj:
367         * features.pri:
368         * html/HTMLAttributeNames.in:
369         * html/HTMLTagNames.in:
370         * html/HTMLTrackElement.cpp: Removed.
371         * html/HTMLTrackElement.h: Removed.
372         * html/HTMLTrackElement.idl: Removed.
373
374 2011-04-08  Brady Eidson  <beidson@apple.com>
375
376         Reviewed by Adam Roben.
377
378         https://bugs.webkit.org/show_bug.cgi?id=58155 and part of <rdar://problem/9251767>
379         BitmapImage::getFirstCGImageRefOfSize fails if the frameCount hasn't been initialized from the image source.
380
381         * platform/graphics/cg/ImageCG.cpp:
382         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Call frameCount() instead of accessing m_frames.size() to
383           make sure the frames are properly tallied first.
384
385 2011-04-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
386
387         Reviewed by Andreas Kling.
388
389         [Qt] Dragging and dropping an image in edit mode does not work
390         https://bugs.webkit.org/show_bug.cgi?id=19385
391
392         When adding an image to the clipboard, we should also include the HTML code of that image so
393         it can be used for internal drag and drop.
394
395         This HTML is expected by all clients of drop events so a fragment can be moved from one browser to
396         another, or inside the same browser.
397
398         * platform/qt/ClipboardQt.cpp:
399         (WebCore::ClipboardQt::declareAndWriteDragImage):
400
401 2011-04-07  Anna Cavender  <annacc@chromium.org>
402
403         Reviewed by Eric Carlson.
404
405         Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
406         https://bugs.webkit.org/show_bug.cgi?id=53556
407
408         No new tests. No real functionality added just yet.
409
410         * CMakeLists.txt:
411         * Configurations/FeatureDefines.xcconfig:
412         * DerivedSources.make:
413         * GNUmakefile.am:
414         * WebCore.gypi:
415         * WebCore.xcodeproj/project.pbxproj:
416         * features.pri:
417         * html/HTMLAttributeNames.in:
418         * html/HTMLTagNames.in:
419         * html/HTMLTrackElement.cpp: Added.
420         (WebCore::HTMLTrackElement::HTMLTrackElement):
421         (WebCore::HTMLTrackElement::create):
422         (WebCore::HTMLTrackElement::insertedIntoTree):
423         (WebCore::HTMLTrackElement::willRemove):
424         (WebCore::HTMLTrackElement::src):
425         (WebCore::HTMLTrackElement::setSrc):
426         (WebCore::HTMLTrackElement::kind):
427         (WebCore::HTMLTrackElement::setKind):
428         (WebCore::HTMLTrackElement::srclang):
429         (WebCore::HTMLTrackElement::setSrclang):
430         (WebCore::HTMLTrackElement::label):
431         (WebCore::HTMLTrackElement::setLabel):
432         (WebCore::HTMLTrackElement::isDefault):
433         (WebCore::HTMLTrackElement::setIsDefault):
434         (WebCore::HTMLTrackElement::isURLAttribute):
435         * html/HTMLTrackElement.h: Added.
436         * html/HTMLTrackElement.idl: Added.
437
438 2011-04-07  Jer Noble  <jer.noble@apple.com>
439
440         Reviewed by Eric Carlson.
441
442         Logic error in HTMLMediaElement::exitFullscreen()
443         https://bugs.webkit.org/show_bug.cgi?id=58085
444
445         The new full screen API case could fall through to the legacy API case
446         unintentionally if a script calls exitFullscreen on an element which is
447         not the current full screen element.
448
449         * html/HTMLMediaElement.cpp:
450         (WebCore::HTMLMediaElement::enterFullscreen):
451         (WebCore::HTMLMediaElement::exitFullscreen):
452
453 2011-04-08  Mike Reed  <reed@google.com>
454
455         Reviewed by Eric Seidel.
456
457         Replace SKIA_TEXT with isNativeFontRenderingAllowed() for print-preview to work
458         https://bugs.webkit.org/show_bug.cgi?id=57782
459
460         No new tests. This change only affects print-preview and build option SKIA_GPU 
461
462         * platform/graphics/skia/SkiaFontWin.cpp:
463         (WebCore::paintSkiaText):
464
465 2011-04-08  Ryosuke Niwa  <rniwa@webkit.org>
466
467         Reviewed by Tony Chang, Darin Adler, and Enrica Casucci.
468
469         REGRESSION(r81887): Crash in SplitElement
470         https://bugs.webkit.org/show_bug.cgi?id=57743
471
472         The crash was caused by ReplaceSelectionCommand::doApply's calling splitElement with computeNodeAfterPosition
473         even when the position was after the last node in it container. Since all we are doing here is to splitting tree
474         up until the highest ancestor with isInlineNodeWithStyle, replaced the while loop by calls to splitTreeToNode
475         and highestEnclosingNodeOfType.
476
477         Also fixed a bug in splitTreeToNode not to check the difference in visible position when splitting the ancestor,
478         which would have introduced unnecessary nodes when splitting tree and a bug in highestEnclosingNodeOfType that
479         it incorrectly called deprecatedNode instead of containerNode.
480
481         Test: editing/inserting/insert-images-in-pre-x-crash.html
482
483         * editing/CompositeEditCommand.cpp:
484         (WebCore::CompositeEditCommand::splitTreeToNode):
485         * editing/ReplaceSelectionCommand.cpp:
486         (WebCore::ReplaceSelectionCommand::doApply):
487         * editing/htmlediting.cpp:
488         (WebCore::highestEnclosingNodeOfType):
489
490 2011-04-08  Antti Koivisto  <antti@apple.com>
491
492         Reviewed by Tony Gentilcore.
493
494         Incoming source should be preload scanned when the parser is blocked 
495         https://bugs.webkit.org/show_bug.cgi?id=58117
496
497         Scan the appended source if parser is blocked.
498
499         Test: http/tests/loading/preload-append-scan.php
500
501         * html/parser/HTMLDocumentParser.cpp:
502         (WebCore::HTMLDocumentParser::append):
503
504 2011-04-08  Martin Robinson  <mrobinson@igalia.com>
505
506         Reviewed by Xan Lopez.
507
508         [GTK] Fix the WebKit2 build for older versions of GTK+
509         https://bugs.webkit.org/show_bug.cgi?id=58095
510
511         No new tests. This is just a build fix.
512
513         * platform/gtk/GtkVersioning.c:
514         (gdk_window_create_similar_surface): Reimplement this method for older versions of GDK.
515         * platform/gtk/GtkVersioning.h: Add the new method to the header.
516
517 2011-04-08  Misha Tyutyunik  <michael.tyutyunik@nokia.com>
518
519         Reviewed by Laszlo Gombos.
520
521         [Qt] Plugin is not scrolled together with page content or jumping 
522         when content is rendered using cache (backing store).
523         https://bugs.webkit.org/show_bug.cgi?id=56130
524         
525         This is a Symbian portion of the fix. For Linux it looks like
526         it's enough to call set geometry which should be addressed in
527         https://bugs.webkit.org/show_bug.cgi?id=57179
528
529         No new tests required. This can be tested with manual tests from 
530         WebCore/manual-tests/qt and WebCore/manual-tests/plugins
531
532         * plugins/symbian/PluginViewSymbian.cpp:
533         (WebCore::PluginView::updatePluginWidget):
534
535 2011-04-08  Abhishek Arya  <inferno@chromium.org>
536
537         Unreviewed. Remove accidental printf added in r83306.
538
539         * page/EventHandler.cpp:
540         (WebCore::EventHandler::sendContextMenuEvent):
541
542 2011-04-08  Enrica Casucci  <enrica@apple.com>
543
544         Reviewed by Darin Adler.
545
546         Dragging text in a WebKit2 window results in a copy instead of a move.
547         https://bugs.webkit.org/show_bug.cgi?id=56772
548         <rdar://problem/9165140>
549
550         cleanupAfterSystemDrag cannot call dragEnd in WebKit2, since
551         the call to startDrag is asynchronous.
552         
553         * page/mac/DragControllerMac.mm:
554         (WebCore::DragController::cleanupAfterSystemDrag):
555
556 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
557
558         Reviewed by Darin Adler.
559
560         Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
561         https://bugs.webkit.org/show_bug.cgi?id=57642
562
563         Covered by existing tests, no functional change.
564
565         * dom/Event.cpp:
566         * dom/Event.h:
567         (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
568             constructor.
569         (WebCore::EventDispatchMediator::event): Inlined.
570         (WebCore::EventDispatchMediator::setEvent): Added.
571         * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
572         * dom/EventDispatcher.h: Updated decls.
573         * dom/Node.cpp:
574         (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
575             return a bool, like other dispatch event functions.
576         * dom/Node.h: Changed decl.
577         * dom/WheelEvent.cpp:
578         (WebCore::granularity): Moved from EventDispatcher.
579         (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
580         (WebCore::WheelEventDispatchMediator::event): Added.
581         (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
582         * dom/WheelEvent.h: Updated decls.
583         * page/EventHandler.cpp:
584         (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
585             to the return value.
586
587 2011-04-08  Jessie Berlin  <jberlin@apple.com>
588
589         Windows build warning fix.
590
591         * WebCore.vcproj/WebCore.vcproj:
592         Since ShadowRoot.cpp is included in the DOMAllInOne.cpp file, it should be excluded from
593         the build.
594
595 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
596
597         Reviewed by Pavel Feldman.
598
599         Web Inspector: update breakpoints according to source frame decorations after live edit.
600         https://bugs.webkit.org/show_bug.cgi?id=58029
601
602         * inspector/front-end/DebuggerPresentationModel.js:
603         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
604         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
605         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent.didEditScriptSource):
606         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent):
607         * inspector/front-end/SourceFile.js:
608         (WebInspector.SourceFile.prototype.set content):
609         * inspector/front-end/SourceFrame.js:
610         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
611         (WebInspector.SourceFrame.prototype._handleSave):
612
613 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
614
615         Reviewed by Pavel Feldman.
616
617         Web Inspector: fix scripts concatenation in scripts panel.
618         https://bugs.webkit.org/show_bug.cgi?id=58138
619
620         When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
621
622         * inspector/front-end/SourceFile.js:
623         (WebInspector.SourceFile.prototype._loadResourceContent):
624         (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
625
626 2011-04-08  Pavel Feldman  <pfeldman@chromium.org>
627
628         Reviewed by Yury Semikhatsky.
629
630         Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements.
631         https://bugs.webkit.org/show_bug.cgi?id=58118
632
633         This change reuses location for call frames in the protocol + structures script
634         location <-> source lines interaction better. When we need UI columns, we will add
635         them, but we should distinguish between script and UI terms on the type level, not naming.
636
637         * English.lproj/localizedStrings.js:
638         * bindings/v8/DebuggerScript.js:
639         * inspector/InjectedScriptSource.js:
640         * inspector/Inspector.json:
641         * inspector/front-end/CallStackSidebarPane.js:
642         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
643         (WebInspector.CallStackSidebarPane.prototype.update):
644         * inspector/front-end/DebuggerPresentationModel.js:
645         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping):
646         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
647         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
648         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
649         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
650         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
651         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
652         (WebInspector.PresenationCallFrame):
653         (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping):
654         (WebInspector.PresenationCallFrame.prototype.sourceLine):
655         * inspector/front-end/ScriptFormatter.js:
656         (WebInspector.ScriptFormatter.locationToPosition):
657         (WebInspector.ScriptFormatter.lineToPosition):
658         * inspector/front-end/ScriptsPanel.js:
659         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
660         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
661         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
662         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
663         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
664         * inspector/front-end/SourceFile.js:
665         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine):
666         (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation):
667         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
668         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
669
670 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
671
672         Reviewed by Pavel Feldman.
673
674         Web Inspector: distinguish breakpoints set on de-obfuscated sources from breakponts set on original sources.
675         https://bugs.webkit.org/show_bug.cgi?id=58133
676
677         * inspector/front-end/DebuggerPresentationModel.js:
678         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
679         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
680         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
681         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
682         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
683         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
684         (WebInspector.DebuggerPresentationModel.prototype._reset):
685
686 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
687
688         Reviewed by Pavel Feldman.
689
690         Web Inspector: make SourceFrame TextViewer's delegate for editing operations.
691         https://bugs.webkit.org/show_bug.cgi?id=58026
692
693         This is the first step of decoupling TextViewer from SourceFrame.
694
695         * inspector/front-end/SourceFrame.js:
696         (WebInspector.SourceFrame):
697         (WebInspector.SourceFrame.prototype.show):
698         (WebInspector.SourceFrame.prototype.hide):
699         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
700         (WebInspector.SourceFrame.prototype.contentEditable):
701         (WebInspector.SourceFrame.prototype.startEditing):
702         (WebInspector.SourceFrame.prototype.endEditing):
703         (WebInspector.SourceFrame.prototype._createTextViewer):
704         (WebInspector.SourceFrame.prototype._handleSave):
705         (WebInspector.SourceFrame.prototype._handleRevertEditing):
706         * inspector/front-end/TextViewer.js:
707         (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
708         (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
709         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
710         (WebInspector.TextViewer.prototype._doubleClick):
711         (WebInspector.TextViewerDelegate):
712         (WebInspector.TextViewerDelegate.prototype.contentEditable):
713         (WebInspector.TextViewerDelegate.prototype.startEditing):
714         (WebInspector.TextViewerDelegate.prototype.endEditing):
715         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
716         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
717         * inspector/front-end/inspector.html:
718
719 2011-04-08  Leandro Gracia Gil  <leandrogracia@chromium.org>
720
721         Reviewed by Steve Block.
722
723         Media Stream API: add the getUserMedia method and the Javascript bindings.
724         https://bugs.webkit.org/show_bug.cgi?id=56586
725
726         Add the getUserMedia method to the navigator and its new Javascript types.
727         Current specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication
728
729         Tests: fast/dom/MediaStream/argument-types.html
730                fast/dom/MediaStream/enabled.html
731                fast/dom/MediaStream/no-interface-object.html
732
733         * Android.derived.jscbindings.mk:
734         * Android.derived.v8bindings.mk:
735         * Android.v8bindings.mk:
736         * CMakeLists.txt:
737         * CodeGenerators.pri:
738         * DerivedSources.cpp:
739         * DerivedSources.make:
740         * GNUmakefile.list.am:
741         * WebCore.gypi:
742         * WebCore.pro:
743         * WebCore.vcproj/WebCore.vcproj:
744         * WebCore.xcodeproj/project.pbxproj:
745         * bindings/js/JSNavigatorCustom.cpp:
746         (WebCore::JSNavigator::webkitGetUserMedia):
747         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
748         (WebCore::V8Navigator::webkitGetUserMediaCallback):
749         * page/Navigator.cpp:
750         (WebCore::Navigator::webkitGetUserMedia):
751         * page/Navigator.h:
752         * page/Navigator.idl:
753         * page/NavigatorUserMediaError.h: Added.
754         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
755         (WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
756         (WebCore::NavigatorUserMediaError::code):
757         * page/NavigatorUserMediaError.idl: Added.
758         * page/NavigatorUserMediaErrorCallback.h: Added.
759         (WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
760         * page/NavigatorUserMediaErrorCallback.idl: Added.
761         * page/NavigatorUserMediaSuccessCallback.h: Added.
762         (WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
763         * page/NavigatorUserMediaSuccessCallback.idl: Added.
764
765 2011-04-08  Mikhail Naganov  <mnaganov@chromium.org>
766
767         Reviewed by Pavel Feldman.
768
769         Web Inspector: [Chromium] Add more tests for detailed heap snapshots UI.
770         https://bugs.webkit.org/show_bug.cgi?id=58010
771         https://bugs.webkit.org/show_bug.cgi?id=58011
772
773         Added tests for "Containment" view. Minor refactorings, bugs fixed.
774         Split one large tests into smaller ones to avoid timing out in debug mode.
775
776         Tests: inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
777                inspector/profiler/detailed-heapshots-containment-show-all.html
778                inspector/profiler/detailed-heapshots-containment-show-next.html
779                inspector/profiler/detailed-heapshots-containment-sorting.html
780                inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
781                inspector/profiler/detailed-heapshots-summary-show-all.html
782                inspector/profiler/detailed-heapshots-summary-show-next.html
783                inspector/profiler/detailed-heapshots-summary-sorting.html
784
785         * inspector/front-end/DetailedHeapshotGridNodes.js:
786         (WebInspector.HeapSnapshotGridNode):
787         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
788         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
789         (WebInspector.HeapSnapshotGridNode.prototype.sort):
790         (WebInspector.HeapSnapshotGenericObjectNode):
791         (WebInspector.HeapSnapshotObjectNode):
792         (WebInspector.HeapSnapshotInstanceNode):
793         (WebInspector.HeapSnapshotConstructorNode):
794         (WebInspector.HeapSnapshotDiffNode):
795         (WebInspector.HeapSnapshotDominatorObjectNode):
796         * inspector/front-end/DetailedHeapshotView.js:
797         (WebInspector.HeapSnapshotContainmentDataGrid):
798         (WebInspector.HeapSnapshotDominatorsDataGrid):
799
800 2011-04-08  Andrey Adaikin  <aandrey@google.com>
801
802         Reviewed by Pavel Feldman.
803
804         Web Inspector: Bugs in some corner cases in the text editor
805         https://bugs.webkit.org/show_bug.cgi?id=58025
806
807         This solves the following bugs:
808         1) The very last _empty_ line would not be deleted if you hit a Backspace on it, or the selection text to be deleted is extended to the very bottom of the editor.
809         2) An odd corner case: delete all source code from the editor, hit backspace on the only empty line, then add a character. In this case the browser will insert a TEXT node instead of a DIV node for a lineRow.
810
811         * inspector/front-end/TextViewer.js:
812         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
813         (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
814         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
815         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
816         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
817
818 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
819
820         Reviewed by Pavel Feldman.
821
822         Web Inspector: add test for script formatter worker.
823         https://bugs.webkit.org/show_bug.cgi?id=57447
824
825         Test: inspector/debugger/script-formatter.html
826
827         * GNUmakefile.am:
828         * WebCore.xcodeproj/project.pbxproj:
829         * gyp/streamline-inspector-source.sh:
830         * inspector/front-end/DebuggerPresentationModel.js:
831         (WebInspector.DebuggerPresentationModel.prototype._addScript):
832         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
833         (WebInspector.DebuggerPresentationModel.prototype._formatter):
834         * inspector/front-end/ScriptFormatterWorker.js:
835
836 2011-04-08  Andrey Adaikin  <aandrey@google.com>
837
838         Reviewed by Pavel Feldman.
839
840         Web Inspector: Tweak dynamically constants for the async highlighting in text editor
841         https://bugs.webkit.org/show_bug.cgi?id=58035
842
843         * inspector/front-end/TextViewer.js:
844         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
845         (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
846         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
847         (WebInspector.TextEditorMainPanel.prototype._restorePaintLinesOperationsCredit):
848         (WebInspector.TextEditorMainPanel.prototype._adjustPaintLinesOperationsRefreshValue):
849
850 2011-04-08  Andrey Kosyakov  <caseq@chromium.org>
851
852         Reviewed by Yury Semikhatsky.
853
854         Web Inspector: HAR compliance fixes
855         https://bugs.webkit.org/show_bug.cgi?id=58124
856
857         - Always provide some values for queryString and cookies, even though arrays may be empty
858         - Always provide an empty cache object
859         - Added entire HARLog to test
860         - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
861
862         * inspector/front-end/HAREntry.js:
863         (WebInspector.HAREntry.prototype.build):
864         (WebInspector.HAREntry.prototype._buildRequest):
865         (WebInspector.HAREntry.prototype._buildResponse):
866
867 2011-04-08  Adam Barth  <abarth@webkit.org>
868
869         Attempt to fix the Qt build.
870
871         * css/CSSStyleApplyProperty.cpp:
872
873 2011-04-07  Adam Barth  <abarth@webkit.org>
874
875         Reviewed by Eric Seidel.
876
877         Refactor WebCore/GNUMakefile.am to separate list of files
878         https://bugs.webkit.org/show_bug.cgi?id=58116
879
880         This change is similar to the cooresponding to change to
881         JavaScriptCore.  We hope to generate GNUmakefile.list.am automatically
882         using GYP.
883
884         * GNUmakefile.am:
885         * GNUmakefile.list.am: Added.
886
887 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
888
889         Not reviewed.
890
891         Rolled out some accidentally-committed changes in my last commit.
892
893         * dom/EventTarget.cpp:
894         (WebCore::EventTarget::addEventListener):
895         (WebCore::EventTarget::removeEventListener):
896         * dom/EventTarget.h:
897
898 2011-04-07  Julien Chaffraix  <jchaffraix@codeaurora.org>
899
900         Reviewed by Alexey Proskuryakov.
901
902         EventSource should only accept UTF-8 charset
903         https://bugs.webkit.org/show_bug.cgi?id=56942
904
905         Following the discussion on bug 45372, this change implements the recommended
906         way of handling "charset". We only accept UTF-8 but no other encoding. This matches
907         the encoding of the EventSource and also may fix TomCat that automatically send this
908         charset.
909
910         * page/EventSource.cpp:
911         (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is
912         not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type
913         is wrong to the console to help debugging (only in the case of an HTTP 200 response though).
914
915 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
916
917         Reviewed by Maciej Stachowiak.
918
919         Some Handle<T> cleanup
920         https://bugs.webkit.org/show_bug.cgi?id=58109
921
922         * bindings/js/ScriptValue.h:
923         (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
924         (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
925
926 2011-04-07  Dominic Cooney  <dominicc@google.com>
927
928         Reviewed by Dimitri Glazkov.
929
930         Let shadow DOM have a list of nodes at the top level of a shadow.
931         https://bugs.webkit.org/show_bug.cgi?id=57813
932
933         Adds ShadowRoot, a list of nodes, to be a parent for top-level
934         shadow children. Forwards rendering through the root and into the
935         host's renderer.
936
937         Covered by existing tests of elements that use this style of shadow.
938
939         * Android.mk: add ShadowRoot.h/cpp
940         * CMakeLists.txt:
941         * GNUmakefile.am:
942         * WebCore.exp.in:
943         * WebCore.gypi:
944         * WebCore.pro:
945         * WebCore.vcproj/WebCore.vcproj:
946         * WebCore.xcodeproj/project.pbxproj:
947         * css/CSSStyleSelector.cpp:
948         (WebCore::CSSStyleSelector::initForStyleResolve): proxy style to host
949         * dom/ContainerNode.cpp: parent nodes that are shadow roots are alive
950         (WebCore::ContainerNode::insertBefore):
951         (WebCore::ContainerNode::replaceChild):
952         (WebCore::ContainerNode::removeChild):
953         (WebCore::ContainerNode::appendChild):
954         * dom/DocumentFragment.cpp:
955         (WebCore::DocumentFragment::DocumentFragment):
956         * dom/DocumentFragment.h:
957         * dom/Element.cpp:
958         (WebCore::Element::recalcStyle): look through ShadowRoots for host's style
959         (WebCore::Element::shadowRoot): should be const
960         (WebCore::Element::ensureShadowRoot): simpler than setShadowRoot
961         * dom/Element.h:
962         * dom/ElementRareData.h:
963         * dom/Node.cpp:
964         (WebCore::Node::parentNodeForRenderingAndStyle): indirection so
965           ShadowRoot can forward to the host's renderer
966         (WebCore::Node::createRendererAndStyle):
967         (WebCore::Node::createRendererIfNeeded):
968         * dom/Node.h:
969         (WebCore::Node::isShadowBoundary): temporary, to differentiate
970           old- and new-style, until all roots are ShadowRoot instances
971         * dom/ShadowRoot.cpp: Added.
972         (WebCore::ShadowRoot::ShadowRoot):
973         (WebCore::ShadowRoot::recalcStyle): forward recalc to children
974         * dom/ShadowRoot.h: Added.
975         (WebCore::ShadowRoot::isShadowBoundary):
976         (WebCore::ShadowRoot::create):
977         * html/HTMLKeygenElement.cpp: use ensureShadowRoot
978         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
979         (WebCore::HTMLKeygenElement::parseMappedAttribute):
980         (WebCore::HTMLKeygenElement::appendFormData):
981         (WebCore::HTMLKeygenElement::reset):
982         (WebCore::HTMLKeygenElement::shadowSelect):
983         * html/HTMLKeygenElement.h:
984         * html/HTMLMeterElement.cpp: use ensureShadowRoot
985         (WebCore::HTMLMeterElement::createShadowSubtree):
986         * html/HTMLProgressElement.cpp: use ensureShadowRoot
987         (WebCore::HTMLProgressElement::createShadowSubtree):
988         * html/InputType.cpp: use ensureShadowRoot
989         (WebCore::InputType::destroyShadowSubtree):
990         * html/RangeInputType.cpp: use ensureShadowRoot
991         (WebCore::RangeInputType::handleMouseDownEvent):
992         (WebCore::RangeInputType::createShadowSubtree):
993         (WebCore::RangeInputType::valueChanged):
994         (WebCore::RangeInputType::shadowSliderThumb):
995         * html/RangeInputType.h:
996         * html/ValidationMessage.cpp: use ensureShadowRoot
997         (WebCore::ValidationMessage::buildBubbleTree):
998         (WebCore::ValidationMessage::deleteBubbleTree):
999         * html/shadow/SliderThumbElement.cpp:
1000         (WebCore::SliderThumbElement::setPositionFromPoint):
1001         (WebCore::SliderThumbElement::hostInput):
1002         * html/shadow/SliderThumbElement.h:
1003         * rendering/MediaControlElements.cpp: use ensureShadowRoot
1004         (WebCore::MediaControlInputElement::attach):
1005         (WebCore::MediaControlInputElement::updateStyle):
1006         * rendering/RenderSlider.cpp: use ensureShadowRoot
1007         (WebCore::RenderSlider::thumbRect):
1008         (WebCore::RenderSlider::layout):
1009         (WebCore::RenderSlider::shadowSliderThumb):
1010         (WebCore::RenderSlider::inDragMode):
1011         * rendering/RenderSlider.h:
1012
1013 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
1014
1015         Reviewed by Simon Fraser.
1016
1017         REGRESSION (r80871): Crash when visiting http://broadband.biglobe.ne.jp/
1018         https://bugs.webkit.org/show_bug.cgi?id=56297
1019         <rdar://problem/9131597>
1020
1021         Test: fast/css-generated-content/table-row-after-no-crash.html
1022
1023         * rendering/RenderTableRow.cpp:
1024         (WebCore::RenderTableRow::styleDidChange): Factor out generation of before/after
1025         content, and only do it if the row already has a parent. For construction of
1026         anonymous cells to work correctly, the row needs to already have a parent, so
1027         in that case wait a bit.
1028         (WebCore::RenderTableRow::updateBeforeAndAfterContent): Factored out to here.
1029         * rendering/RenderTableRow.h:
1030         * rendering/RenderTableSection.cpp:
1031         (WebCore::RenderTableSection::addChild): When adding a row, update its
1032         before/after content, in case it had any.
1033
1034 2011-04-07  Beth Dakin  <bdakin@apple.com>
1035
1036         Reviewed by Simon Fraser.
1037
1038         Probable fix for <rdar://problem/9251443>  Crashing on exception: -
1039         [ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]: unrecognized 
1040         selector sent to instance ADDRESS.
1041
1042        Need to implement new delegate method.
1043         * platform/mac/ScrollAnimatorMac.mm:
1044         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1045
1046 2011-04-07  Ian Henderson  <ianh@apple.com>
1047
1048         Reviewed by Simon Fraser.
1049
1050         Optimize filling rounded rects that are actually ellipses
1051         https://bugs.webkit.org/show_bug.cgi?id=58098
1052
1053         In CG, drawing an ellipse directly is faster than constructing and
1054         filling a rounded rect path.  Detect when the given rounded rect is
1055         actually an ellipse and draw it directly in this case.
1056
1057         * platform/graphics/cg/GraphicsContextCG.cpp:
1058         (WebCore::GraphicsContext::fillRoundedRect):
1059
1060 2011-04-07  Ned Holbrook  <nholbrook@apple.com>
1061
1062         Reviewed by Dan Bernstein.
1063
1064         CTLine objects should outlive their CTRuns
1065         https://bugs.webkit.org/show_bug.cgi?id=58063
1066
1067         * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
1068         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1069         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
1070         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
1071
1072 2011-04-07  Nat Duca  <nduca@chromium.org>
1073
1074         Reviewed by David Levin.
1075
1076         [chromium] Compositor thread infrastructure
1077         https://bugs.webkit.org/show_bug.cgi?id=56131
1078
1079         Introduce chrome compositor thread and related
1080         infrastructure.
1081
1082         * WebCore.gypi:
1083         * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
1084         (WebCore::CCMainThread::performTask):
1085         (WebCore::CCMainThread::postTask):
1086         * platform/graphics/chromium/cc/CCMainThread.h: Added.
1087         (WebCore::CCMainThread::Task::~Task):
1088         (WebCore::CCMainThread::Task::instance):
1089         (WebCore::CCMainThread::Task::Task):
1090         * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
1091         (WebCore::MainThreadTask0::create):
1092         (WebCore::MainThreadTask0::MainThreadTask0):
1093         (WebCore::MainThreadTask0::performTask):
1094         (WebCore::MainThreadTask1::create):
1095         (WebCore::MainThreadTask1::MainThreadTask1):
1096         (WebCore::MainThreadTask1::performTask):
1097         (WebCore::MainThreadTask2::create):
1098         (WebCore::MainThreadTask2::MainThreadTask2):
1099         (WebCore::MainThreadTask2::performTask):
1100         (WebCore::MainThreadTask3::create):
1101         (WebCore::MainThreadTask3::MainThreadTask3):
1102         (WebCore::MainThreadTask3::performTask):
1103         (WebCore::createMainThreadTask):
1104         * platform/graphics/chromium/cc/CCThread.cpp: Added.
1105         (WebCore::CCThread::create):
1106         (WebCore::CCThread::CCThread):
1107         (WebCore::CCThread::~CCThread):
1108         (WebCore::CCThread::postTask):
1109         (WebCore::CCThread::compositorThreadStart):
1110         (WebCore::CCThread::runLoop):
1111         * platform/graphics/chromium/cc/CCThread.h: Added.
1112         (WebCore::CCThread::Task::~Task):
1113         (WebCore::CCThread::Task::instance):
1114         (WebCore::CCThread::Task::Task):
1115         (WebCore::CCThread::threadID):
1116         (WebCore::CCCompletionEvent::CCCompletionEvent):
1117         (WebCore::CCCompletionEvent::~CCCompletionEvent):
1118         (WebCore::CCCompletionEvent::wait):
1119         (WebCore::CCCompletionEvent::signal):
1120         * platform/graphics/chromium/cc/CCThreadTask.h: Added.
1121         (WebCore::CCThreadTask0::create):
1122         (WebCore::CCThreadTask0::CCThreadTask0):
1123         (WebCore::CCThreadTask0::performTask):
1124         (WebCore::CCThreadTask1::create):
1125         (WebCore::CCThreadTask1::CCThreadTask1):
1126         (WebCore::CCThreadTask1::performTask):
1127         (WebCore::CCThreadTask2::create):
1128         (WebCore::CCThreadTask2::CCThreadTask2):
1129         (WebCore::CCThreadTask2::performTask):
1130         (WebCore::CCThreadTask3::create):
1131         (WebCore::CCThreadTask3::CCThreadTask3):
1132         (WebCore::CCThreadTask3::performTask):
1133         (WebCore::createCCThreadTask):
1134
1135 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
1136
1137         Reviewed by Eric Seidel.
1138
1139         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1140         https://bugs.webkit.org/show_bug.cgi?id=57872
1141
1142         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1143         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1144
1145         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1146         avoiding the tab span.
1147
1148         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1149         Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
1150         we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
1151         before moving the nodes.
1152
1153         Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
1154                editing/inserting/insert-paragraph-separator-tab-span.html
1155
1156         * editing/DeleteSelectionCommand.cpp:
1157         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
1158         no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
1159         * editing/EditingStyle.cpp:
1160         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1161         * editing/InsertParagraphSeparatorCommand.cpp:
1162         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1163         separator into a paragraph separator.
1164         * editing/htmlediting.cpp:
1165         (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
1166         node after the tab span if the position was at the end of the tab span.
1167         * editing/htmlediting.h:
1168
1169 2011-04-07  Jia Pu  <jpu@apple.com>
1170
1171         Reviewed by Darin Adler.
1172
1173         [Mac] Editor::setComposition() should not trigger correction panel timer.
1174         https://bugs.webkit.org/show_bug.cgi?id=58049
1175          <rdar://problem/9226305>
1176
1177         On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
1178         should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand. 
1179         When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
1180         m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
1181
1182         No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
1183         autocorrection panel timer, which can not be easily done in automated fashion.
1184
1185         * editing/Editor.cpp:
1186         (WebCore::Editor::deleteWithDirection):
1187         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1188         (WebCore::Editor::confirmComposition):
1189         (WebCore::Editor::setComposition):
1190         * editing/EditorCommand.cpp:
1191         (WebCore::executeDelete):
1192         * editing/TypingCommand.cpp:
1193         (WebCore::TypingCommand::TypingCommand):
1194         (WebCore::TypingCommand::deleteSelection):
1195         (WebCore::TypingCommand::deleteKeyPressed):
1196         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1197         (WebCore::TypingCommand::insertText):
1198         (WebCore::TypingCommand::insertLineBreak):
1199         (WebCore::TypingCommand::insertParagraphSeparator):
1200         (WebCore::TypingCommand::typingAddedToOpenCommand):
1201         * editing/TypingCommand.h:
1202         (WebCore::TypingCommand::create):
1203         (WebCore::TypingCommand::setShouldPreventSpellChecking):
1204
1205 2011-04-07  John Bauman  <jbauman@chromium.org>
1206
1207         Reviewed by Kenneth Russell.
1208
1209         clearIfComposited call is really slow
1210         https://bugs.webkit.org/show_bug.cgi?id=57999
1211
1212         Move getContextAttributes call after the if, so it isn't called nearly as often.
1213
1214         No new tests.
1215
1216         * html/canvas/WebGLRenderingContext.cpp:
1217         (WebCore::WebGLRenderingContext::clearIfComposited):
1218
1219 2011-04-07  Luke Macpherson   <macpherson@chromium.org>
1220
1221         Reviewed by Dimitri Glazkov.
1222
1223         Implement Backgroun and Mask properties in CSSStyleApplyProperty
1224         https://bugs.webkit.org/show_bug.cgi?id=57922
1225
1226         No tests added as no behavioral changes.
1227
1228         * css/CSSStyleApplyProperty.cpp:
1229         Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
1230         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1231         Added constructor calls to set up:
1232           CSSPropertyBackgroundAttachment
1233           CSSPropertyBackgroundClip
1234           CSSPropertyWebkitBackgroundClip
1235           CSSPropertyWebkitBackgroundComposite
1236           CSSPropertyBackgroundOrigin
1237           CSSPropertyWebkitBackgroundOrigin
1238           CSSPropertyBackgroundSize
1239           CSSPropertyWebkitBackgroundSize
1240           CSSPropertyWebkitMaskAttachment
1241           CSSPropertyWebkitMaskClip
1242           CSSPropertyWebkitMaskComposite
1243           CSSPropertyWebkitMaskOrigin
1244           CSSPropertyWebkitMaskSize
1245         * css/CSSStyleApplyProperty.h:
1246         (WebCore::CSSStyleApplyProperty::setPropertyValue):
1247         Add function to specify an equivalent property value in the lookup table.
1248         * css/CSSStyleSelector.cpp:
1249         (WebCore::CSSStyleSelector::applyProperty):
1250         Remove sections now implemented by CSSStyleApplyProperty.
1251         * css/CSSStyleSelector.h:
1252         Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
1253
1254 2011-04-04  Eric Seidel  <eric@webkit.org>
1255
1256         Reviewed by Ryosuke Niwa.
1257
1258         Split run storage out from BidiResolver into a new BidiRunList class
1259         https://bugs.webkit.org/show_bug.cgi?id=57764
1260
1261         Part of what makes BidiResolver and InlineIterator so difficult to understand
1262         (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
1263         for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
1264         BidiRuns from the algorithm.  This patch breaks the storage aspect off
1265         into its own class BidiRunList.
1266
1267         This patch is only a start.  It does not actually fix the problematic ownership
1268         relationship, but it does make it possible to fix such in a second patch.
1269
1270         The run pointers and addRun/prependRun, etc. were already a tightly coupled
1271         logical subset of the BidiResolver class, so moving them into their own class
1272         was both obvious and easy.  The only piece of logic I had to move was that
1273         deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
1274
1275         I believe this deleteRuns side-effect was only ever used for one place
1276         (right after findNextLineBreak) and that it's only needed because
1277         findNextLineBreak can sometimes create bidi runs.  Run creation appears to be
1278         an unintentional side-effect of how InlineIterator calls through to BidiResolver
1279         as part of bidiNext and not a desired effect of the code.  I have added the call
1280         to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
1281         could get re-used) as a safety precaution.  We could replace both with ASSERTs
1282         in a later patch.
1283
1284         I suspect there may be a small performance win from further refactoring so that
1285         findNextLineBreak does not need to create BidiRuns.
1286
1287         As I commented in the code, callers should own their own BidiRunList which they
1288         pass to BidiResolver::createBidiRunsForLine.  I attempted to implement that in
1289         an earlier version of this patch, but it was too complicated with the current
1290         twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
1291         raise/lowerExplicitEmbeddingLevel are called unconditionally
1292         from commitExplicitEmbedding (which is called by bidiNext) and expect to have
1293         access to a runs list even in cases where we don't want any runs (findNextLineBreak).
1294
1295         I also cleaned up some of the callers to pass around BidiRunList objects instead
1296         of InlineBidiResolvers now that they're separate objects.
1297
1298         * GNUmakefile.am:
1299         * WebCore.gypi:
1300         * WebCore.pro:
1301         * WebCore.vcproj/WebCore.vcproj:
1302         * WebCore.xcodeproj/project.pbxproj:
1303         * platform/graphics/GraphicsContext.cpp:
1304         (WebCore::GraphicsContext::drawBidiText):
1305         * platform/text/BidiResolver.h:
1306         (WebCore::BidiResolver::BidiResolver):
1307         (WebCore::BidiResolver::runs):
1308         (WebCore::BidiResolver::markCurrentRunEmpty):
1309         (WebCore::::appendRun):
1310         (WebCore::::lowerExplicitEmbeddingLevel):
1311         (WebCore::::raiseExplicitEmbeddingLevel):
1312         (WebCore::::reorderRunsFromLevels):
1313         (WebCore::::createBidiRunsForLine):
1314         * rendering/InlineIterator.h:
1315         (WebCore::InlineBidiResolver::appendRun):
1316         * rendering/RenderBlock.h:
1317         * rendering/RenderBlockLineLayout.cpp:
1318         (WebCore::createRun):
1319         (WebCore::RenderBlock::appendRunsForObject):
1320         (WebCore::reachedEndOfTextRenderer):
1321         (WebCore::RenderBlock::handleTrailingSpaces):
1322         (WebCore::RenderBlock::layoutInlineChildren):
1323
1324 2011-04-07  Naoki Takano  <takano.naoki@gmail.com>
1325
1326         Reviewed by Adam Barth.
1327
1328         [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
1329         https://bugs.webkit.org/show_bug.cgi?id=57911
1330         http://code.google.com/p/chromium/issues/detail?id=78073
1331
1332         Manual test added: manual-tests/autofill-popup-location.html
1333
1334         Originally only height is checked so that it introduces the bug.
1335         So I changed it to check both width and height as size.
1336
1337         * manual-tests/autofill-popup-location.html: Added.
1338         * platform/chromium/PopupMenuChromium.cpp:
1339         (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
1340
1341 2011-04-07  Adam Barth  <abarth@webkit.org>
1342
1343         Reviewed by Eric Seidel.
1344
1345         Implement img-src style-src and font-src
1346         https://bugs.webkit.org/show_bug.cgi?id=58018
1347
1348         These are pretty straight forward given the rest of the infrastructure
1349         we've built so far.
1350
1351         Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
1352                http/tests/security/contentSecurityPolicy/image-blocked.html
1353                http/tests/security/contentSecurityPolicy/style-allowed.html
1354                http/tests/security/contentSecurityPolicy/style-blocked.html
1355                http/tests/security/contentSecurityPolicy/xsl-allowed.php
1356                http/tests/security/contentSecurityPolicy/xsl-blocked.php
1357
1358         * loader/cache/CachedResourceLoader.cpp:
1359         (WebCore::CachedResourceLoader::canRequest):
1360         * page/ContentSecurityPolicy.cpp:
1361         (WebCore::ContentSecurityPolicy::allowImageFromSource):
1362         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
1363         (WebCore::ContentSecurityPolicy::allowFontFromSource):
1364         (WebCore::ContentSecurityPolicy::addDirective):
1365         * page/ContentSecurityPolicy.h:
1366
1367 2011-04-07  David Levin  <levin@chromium.org>
1368
1369         Reviewed by Darin Adler.
1370
1371         Make IconSnapshot and PageURLRecord member variables private.
1372         https://bugs.webkit.org/show_bug.cgi?id=58080
1373
1374         No change in functionality so no new tests.
1375
1376         * loader/icon/IconDatabase.cpp:
1377         (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
1378         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
1379         * loader/icon/IconRecord.h:
1380         (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
1381         (WebCore::IconSnapshot::iconURL): Expose the property.
1382         (WebCore::IconSnapshot::timestamp): Ditto.
1383         (WebCore::IconSnapshot::data): Ditto.
1384         * loader/icon/PageURLRecord.h:
1385         (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
1386         (WebCore::PageURLSnapshot::pageURL): Expose the property.
1387         (WebCore::PageURLSnapshot::iconURL): Ditto.
1388
1389 2011-04-07  Dan Bernstein  <mitz@apple.com>
1390
1391         Build fix.
1392
1393         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1394         (WebCore::GraphicsContext::roundToDevicePixels):
1395
1396 2011-04-07  Eric Seidel  <eric@webkit.org>
1397
1398         Reviewed by Adam Barth.
1399
1400         Add stub support for generating Gtk build system from gyp
1401         https://bugs.webkit.org/show_bug.cgi?id=58086
1402
1403         This does not produce a buildable WebCore, but it
1404         does allow running gyp/configure --port=gtk and having
1405         it generate a gtk.Makefile which we can use for testing
1406         the rest of the plumbing.
1407
1408         * gyp/gtk.gyp: Added.
1409
1410 2011-04-07  David Hyatt  <hyatt@apple.com>
1411
1412         Reviewed by Dan Bernstein.
1413
1414         https://bugs.webkit.org/show_bug.cgi?id=57736
1415         
1416         Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
1417         optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
1418         layout finished. This would eventually lead to an inability to properly determine the correct layout root and
1419         would cause a deleted root to be used later on.
1420
1421         Added fast/block/positioning/complex-positioned-movement.html.
1422
1423         * page/FrameView.cpp:
1424         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1425         Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
1426     
1427         * rendering/RenderBlock.cpp:
1428         (WebCore::RenderBlock::simplifiedLayout):
1429         Change simplified layout so that the positioned movement optimization no longer clears the other layout
1430         flags. This will ensure that we still lay out our descendants if they need it.
1431         
1432         (WebCore::RenderBlock::layoutPositionedObjects):
1433         Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
1434         no longer does the clear.
1435     
1436         * rendering/RenderBox.h:
1437         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
1438         tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
1439         does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
1440         the other flags in case other kinds of layout are still needed.
1441     
1442         * rendering/RenderObject.h:
1443         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
1444         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
1445         Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
1446
1447 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
1448
1449         Revert ENABLE_TRACK patch due to compile failures.
1450
1451         * CMakeLists.txt:
1452         * Configurations/FeatureDefines.xcconfig:
1453         * DerivedSources.make:
1454         * GNUmakefile.am:
1455         * WebCore.gypi:
1456         * WebCore.xcodeproj/project.pbxproj:
1457         * features.pri:
1458         * html/HTMLAttributeNames.in:
1459         * html/HTMLTagNames.in:
1460         * html/HTMLTrackElement.cpp: Removed.
1461         * html/HTMLTrackElement.h: Removed.
1462         * html/HTMLTrackElement.idl: Removed.
1463
1464 2011-04-07  Dan Bernstein  <mitz@apple.com>
1465
1466         Reviewed by Simon Fraser.
1467
1468         <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
1469         https://bugs.webkit.org/show_bug.cgi?id=58083
1470
1471         Test: fast/text/decorations-transformed.html
1472
1473         * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
1474         is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
1475         gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
1476         the width and the height. In this new mode, translating a rectangle in user space never changes
1477         its dimensions in device pixels.
1478         * platform/graphics/cg/GraphicsContextCG.cpp:
1479         (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
1480         (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
1481         all underlines have the same thickness in device pixels.
1482         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1483         (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
1484         * platform/graphics/qt/GraphicsContextQt.cpp:
1485         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
1486         * platform/graphics/skia/GraphicsContextSkia.cpp:
1487         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
1488         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1489         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
1490         * platform/graphics/wx/GraphicsContextWx.cpp:
1491         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
1492         * rendering/InlineTextBox.cpp:
1493         (WebCore::InlineTextBox::paintDecoration):
1494
1495 2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
1496
1497         Reviewed by Nate Chapin.
1498
1499         [V8] Remove custom DOMImplementation getter on Document.
1500         https://bugs.webkit.org/show_bug.cgi?id=57991
1501
1502         The custom getter is no longer required because DOMImplementation
1503         objects are now created per document.
1504
1505         Test: fast/dom/DOMImplementation/implementation-identity.html
1506
1507         * bindings/scripts/CodeGeneratorV8.pm:
1508         * bindings/v8/custom/V8DocumentCustom.cpp:
1509         * dom/Document.idl:
1510
1511 2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
1512
1513         Reviewed by Dimitri Glazkov.
1514
1515         setHasID() is only called for styled elements
1516         https://bugs.webkit.org/show_bug.cgi?id=57267
1517
1518         Test: fast/dom/non-styled-element-id-crash.html
1519
1520         * dom/Element.cpp:
1521         (WebCore::Element::attributeChanged):
1522         (WebCore::Element::idAttributeChanged):
1523         * dom/Element.h:
1524         * dom/StyledElement.cpp:
1525         (WebCore::StyledElement::parseMappedAttribute):
1526
1527 2011-04-07  Jer Noble  <jer.noble@apple.com>
1528
1529         Reviewed by Eric Carlson.
1530
1531         HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
1532         https://bugs.webkit.org/show_bug.cgi?id=58070
1533
1534         Make the HTMLMediaElement full screen functions call into the new Full Screen API when
1535         FULLSCREEN_API is enabled.
1536
1537         * html/HTMLMediaElement.cpp:
1538         (WebCore::HTMLMediaElement::enterFullscreen):
1539         (WebCore::HTMLMediaElement::exitFullscreen):
1540
1541 2011-04-07  Adam Barth  <abarth@webkit.org>
1542
1543         Reviewed by Eric Seidel.
1544
1545         Implement CSP's options directive
1546         https://bugs.webkit.org/show_bug.cgi?id=58014
1547
1548         This patch contains the full options parser, but we only have enough of
1549         CSP implemented to see the effects of disable-xss-protection.  Will
1550         need to do some more work before we can see eval-script in action.
1551
1552         Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
1553                http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
1554
1555         * page/ContentSecurityPolicy.cpp:
1556         (WebCore::CSPOptions::CSPOptions):
1557         (WebCore::CSPOptions::disableXSSProtection):
1558         (WebCore::CSPOptions::evalScript):
1559         (WebCore::CSPOptions::parse):
1560         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
1561         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
1562         (WebCore::ContentSecurityPolicy::allowInlineScript):
1563         (WebCore::ContentSecurityPolicy::addDirective):
1564         * page/ContentSecurityPolicy.h:
1565
1566 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
1567
1568         Reviewed by Anders Carlsson.
1569
1570         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
1571         https://bugs.webkit.org/show_bug.cgi?id=58066
1572         <rdar://problem/8965302>
1573
1574         * platform/mac/HTMLConverter.h:
1575         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
1576         Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
1577         it's now used in WebKit2.
1578
1579 2011-04-07  Andy Estes  <aestes@apple.com>
1580
1581         Reviewed by Darin Adler.
1582
1583         REGRESSION (r64712): Microsoft Outlook 2011: original message contents
1584         not included when replying to an email.
1585         https://bugs.webkit.org/show_bug.cgi?id=57794
1586         
1587         * WebCore.exp.in:
1588         * loader/FrameLoader.cpp:
1589         (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
1590         before checking if the FrameLoader is parsing the initial empty document.
1591         This allows user scripts to be injected at the end of document parsing
1592         (if the setting is enabled).
1593         * page/Frame.cpp:
1594         (WebCore::Frame::injectUserScripts): Do not inject scripts if this
1595         feature is disabled on the initial empty document.
1596         * page/Settings.cpp:
1597         (WebCore::Settings::Settings):
1598         * page/Settings.h: Add a setting for injecting user scripts into the
1599         initial empty document (defaults to false).
1600         (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
1601         (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
1602         * platform/mac/RuntimeApplicationChecks.h:
1603         * platform/mac/RuntimeApplicationChecks.mm:
1604         (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
1605         application is Microsoft Outlook.
1606
1607 2011-04-06  Jer Noble  <jer.noble@apple.com>
1608
1609         Reviewed by Maciej Stachowiak.
1610
1611         AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
1612         https://bugs.webkit.org/show_bug.cgi?id=57962
1613
1614         Add support for a new AVPlayerItem API which will notify clients when their
1615         seek completes.  This requires a new Notification type to be passed to the main
1616         thread in MediaPlayerPrivateAVFoundation.
1617
1618         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1619         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
1620         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
1621             overloaded functions which take a Notification; and a Notification::Type and boolean.
1622         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted 
1623             Notification type.
1624         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1625         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
1626         (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
1627         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1628         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
1629         (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
1630
1631 2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
1632
1633         Reviewed by Eric Carlson.
1634
1635         Parse quotes from content type parameters
1636         https://bugs.webkit.org/show_bug.cgi?id=53275
1637
1638         This functionality is tested in video-can-play-type.html layout test
1639         where I've added codecs parameter with good and bad formatting.
1640
1641         * platform/ContentType.cpp:
1642         (WebCore::ContentType::parameter):
1643
1644 2011-04-07  Pavel Feldman  <pfeldman@google.com>
1645
1646         Reviewed by Yury Semikhatsky.
1647
1648         Web Inspector: remove "enabled" from the setBreakpoint protocol.
1649         https://bugs.webkit.org/show_bug.cgi?id=58047
1650
1651         * bindings/js/ScriptDebugServer.cpp:
1652         (WebCore::ScriptDebugServer::hasBreakpoint):
1653         * bindings/v8/DebuggerScript.js:
1654         ():
1655         * bindings/v8/ScriptDebugServer.cpp:
1656         (WebCore::ScriptDebugServer::setBreakpoint):
1657         * inspector/Inspector.json:
1658         * inspector/InspectorDebuggerAgent.cpp:
1659         (WebCore::buildObjectForBreakpointCookie):
1660         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1661         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1662         (WebCore::InspectorDebuggerAgent::continueToLocation):
1663         (WebCore::InspectorDebuggerAgent::didParseSource):
1664         * inspector/InspectorDebuggerAgent.h:
1665         * inspector/ScriptBreakpoint.h:
1666         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
1667         * inspector/front-end/DebuggerModel.js:
1668         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1669         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1670         * inspector/front-end/DebuggerPresentationModel.js:
1671         (WebInspector.DebuggerPresentationModel):
1672         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
1673         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
1674         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
1675         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
1676         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
1677         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
1678         (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
1679         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
1680         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
1681         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
1682         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
1683         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1684         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1685         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
1686         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
1687         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
1688         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
1689         (WebInspector.DebuggerPresentationModel.prototype._reset):
1690         (WebInspector.PresentationBreakpoint):
1691
1692 2011-04-07  Dan Bernstein  <mitz@apple.com>
1693
1694         Reviewed by Adam Roben.
1695
1696         Removed a redundant line of code.
1697
1698         * rendering/RenderInline.cpp:
1699         (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
1700         this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
1701
1702 2011-04-07  Liang Qi  <liang.qi@nokia.com>
1703
1704         Reviewed by Laszlo Gombos.
1705
1706         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
1707         https://bugs.webkit.org/show_bug.cgi?id=57841
1708
1709         * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
1710         --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
1711         to 0x1000000 together. They need to be updated in the future when WebKit grows.
1712
1713 2011-04-06  Pavel Feldman  <pfeldman@google.com>
1714
1715         Reviewed by Yury Semikhatsky.
1716
1717         Web Inspector: get rid of Breakpoint.js.
1718         https://bugs.webkit.org/show_bug.cgi?id=57949
1719
1720         * WebCore.gypi:
1721         * WebCore.vcproj/WebCore.vcproj:
1722         * inspector/front-end/Breakpoint.js: Removed.
1723         * inspector/front-end/BreakpointsSidebarPane.js:
1724         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
1725         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
1726         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
1727         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
1728         * inspector/front-end/DebuggerModel.js:
1729         (WebInspector.DebuggerModel):
1730         (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
1731         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
1732         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1733         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1734         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
1735         (WebInspector.DebuggerModel.prototype._breakpointResolved):
1736         (WebInspector.DebuggerModel.prototype.reset):
1737         * inspector/front-end/DebuggerPresentationModel.js:
1738         (WebInspector.DebuggerPresentationModel):
1739         (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
1740         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
1741         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1742         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
1743         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
1744         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
1745         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
1746         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
1747         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1748         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1749         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
1750         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
1751         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
1752         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
1753         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
1754         (WebInspector.DebuggerPresentationModel.prototype._reset):
1755         (WebInspector.PresentationBreakpoint):
1756         (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
1757         (WebInspector.PresentationBreakpoint.prototype.get url):
1758         (WebInspector.PresentationBreakpoint.prototype.get resolved):
1759         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
1760         * inspector/front-end/ResourceTreeModel.js:
1761         (WebInspector.ResourceTreeModel):
1762         (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
1763         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
1764         * inspector/front-end/ScriptsPanel.js:
1765         (WebInspector.ScriptsPanel):
1766         (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
1767         (WebInspector.ScriptsPanel.prototype.reset):
1768         * inspector/front-end/WebKit.qrc:
1769         * inspector/front-end/inspector.html:
1770
1771 2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
1772
1773         Reviewed by Pavel Feldman.
1774
1775         Web Inspector: console messages names should adhere to the common naming style
1776         https://bugs.webkit.org/show_bug.cgi?id=58042
1777
1778         * inspector/ConsoleMessage.cpp:
1779         (WebCore::ConsoleMessage::addToFrontend):
1780         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
1781         * inspector/Inspector.json:
1782         * inspector/InspectorConsoleAgent.cpp:
1783         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
1784         * inspector/front-end/ConsoleView.js:
1785         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
1786         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
1787         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
1788         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
1789
1790 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
1791
1792         Reviewed by Yury Semikhatsky.
1793
1794         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
1795         https://bugs.webkit.org/show_bug.cgi?id=57957
1796
1797         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
1798         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
1799         It was decided that we will use it.
1800
1801         the list of renames:
1802         1) type-> /dev/null
1803         2) domain + '.' + event => method // for events
1804         3) domain + '.' + command => method // for requests
1805         4) requestId => id // for responses
1806         5) arguments => params // for requests
1807         6) data => params // for events
1808         7) body => result // for responses
1809
1810         protocolErrors and error properties will be converted to JSON-RPC error format.
1811         The order of properties in messages also will be adjusted.
1812         The only thing that looks unnecessary is jsonrpc property.
1813
1814         * inspector/CodeGeneratorInspector.pm:
1815
1816 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
1817
1818         Reviewed by Eric Seidel.
1819
1820         Add functions to update left and right offsets to LineOffsets
1821         https://bugs.webkit.org/show_bug.cgi?id=58028
1822
1823         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
1824         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
1825         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
1826
1827         * rendering/RenderBlock.h:
1828         * rendering/RenderBlockLineLayout.cpp:
1829         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
1830         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
1831         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
1832         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
1833         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
1834         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
1835         no longer passes firstLine around.
1836
1837 2011-04-06  Pavel Feldman  <pfeldman@google.com>
1838
1839         Reviewed by Yury Semikhatsky.
1840
1841         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
1842         https://bugs.webkit.org/show_bug.cgi?id=57928
1843
1844         * inspector/Inspector.json:
1845         * inspector/InspectorDebuggerAgent.cpp:
1846         (WebCore::buildObjectForBreakpointCookie):
1847         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1848         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1849         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1850         (WebCore::InspectorDebuggerAgent::didParseSource):
1851         * inspector/InspectorDebuggerAgent.h:
1852         * inspector/front-end/Breakpoint.js:
1853         (WebInspector.Breakpoint):
1854         * inspector/front-end/DebuggerModel.js:
1855         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1856         (WebInspector.DebuggerModel.prototype._breakpointResolved):
1857
1858 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
1859
1860         Reviewed by Benjamin Poulain.
1861
1862         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
1863
1864         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
1865         hint may get set depending on how that widget is laid out in its parent.
1866         If this happens when drawing a vertical scrollbar, the hint is never
1867         cleared and we end up painting a vertical scrollbar with horizontal arrows.
1868
1869         Covered by pixel tests which should no longer paint silly scrollbars.
1870
1871         * platform/qt/ScrollbarThemeQt.cpp:
1872         (WebCore::styleOptionSlider):
1873
1874 2011-04-07  Adam Barth  <abarth@webkit.org>
1875
1876         Reviewed by Eric Seidel.
1877
1878         script-src should block inline script
1879         https://bugs.webkit.org/show_bug.cgi?id=58012
1880
1881         Block inline scripts at the ScriptElement layer.  This should catch
1882         exactly the scripts we want to catch.
1883
1884         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
1885
1886         * dom/Document.cpp:
1887         (WebCore::Document::processHttpEquiv):
1888             - This patch also adds the ability to supply a CSP policy via a
1889               <meta> tag.  We'll update the name of the header once we've
1890               finished implementing the spec.
1891         * dom/ScriptElement.cpp:
1892         (WebCore::ScriptElement::executeScript):
1893         * page/ContentSecurityPolicy.cpp:
1894         (WebCore::ContentSecurityPolicy::allowInlineScript):
1895         * page/ContentSecurityPolicy.h:
1896
1897 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
1898
1899         Reviewed by Ryosuke Niwa.
1900
1901         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
1902         https://bugs.webkit.org/show_bug.cgi?id=57921
1903
1904         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
1905         that the same logic can be used for a HitTestResult.
1906
1907         No visible changes, just cleanup, so no tests.
1908
1909         * page/EventHandler.cpp:
1910         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
1911         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1912         (WebCore::EventHandler::handleMousePressEventTripleClick):
1913         (WebCore::EventHandler::handleMousePressEventSingleClick):
1914         (WebCore::EventHandler::handleMousePressEvent):
1915         (WebCore::EventHandler::handleMouseDraggedEvent):
1916         (WebCore::EventHandler::handleMouseReleaseEvent):
1917         (WebCore::EventHandler::subframeForHitTestResult):
1918         Made public static member, so that it can access targetNode(), and be accessed by
1919         webkitwebview in gtk.
1920         (WebCore::EventHandler::selectCursor):
1921         (WebCore::EventHandler::targetNode):
1922         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1923         (WebCore::EventHandler::handleMouseMoveEvent):
1924         (WebCore::EventHandler::updateDragAndDrop):
1925         (WebCore::EventHandler::sendContextMenuEvent):
1926         * page/EventHandler.h:
1927         * page/MouseEventWithHitTestResults.cpp:
1928         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
1929         * page/MouseEventWithHitTestResults.h:
1930         * page/android/EventHandlerAndroid.cpp:
1931         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1932         * page/brew/EventHandlerBrew.cpp:
1933         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1934         * page/chromium/EventHandlerChromium.cpp:
1935         (WebCore::EventHandler::passMousePressEventToSubframe):
1936         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1937         * page/efl/EventHandlerEfl.cpp:
1938         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1939         * page/gtk/EventHandlerGtk.cpp:
1940         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1941         * page/haiku/EventHandlerHaiku.cpp:
1942         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1943         * page/mac/EventHandlerMac.mm:
1944         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1945         (WebCore::EventHandler::passSubframeEventToSubframe):
1946         * page/wx/EventHandlerWx.cpp:
1947         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1948
1949 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1950
1951         Reviewed by Pavel Feldman.
1952
1953         Web Inspector: build mapping for formatted scripts based on keywords positions.
1954         https://bugs.webkit.org/show_bug.cgi?id=57936
1955
1956         Mapping based on [\$\.\w]+ was not accurate because string literals representation
1957         may be different in original and formatted scripts.
1958
1959         * inspector/front-end/ScriptFormatterWorker.js:
1960         (buildMapping.regexp.b):
1961         (buildMapping):
1962
1963 2011-04-07  Kent Tamura  <tkent@chromium.org>
1964
1965         Reviewed by Dimitri Glazkov.
1966
1967         Spinbuttons become unclickable if right padding is large.
1968         https://bugs.webkit.org/show_bug.cgi?id=56298
1969
1970         An inner-spin-button is put on the right border and ignores right
1971         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
1972         checks if a point is in an area just right of an internal text block.
1973         This inconsistency caused a bug that an inner-spin-button with large
1974         padding didn't receive mouse events.
1975
1976         To fix this bug, we render spin buttons as layers, and remove manual
1977         event forwarding code.
1978
1979         Test: fast/forms/input-number-large-padding.html
1980
1981         * css/html.css: Add "position:relative" to make a spin-button a layer.
1982         (input::-webkit-inner-spin-button):
1983         (input::-webkit-outer-spin-button):
1984         * rendering/RenderTextControlSingleLine.cpp:
1985         (WebCore::RenderTextControlSingleLine::forwardEvent):
1986           Remove manual event forwarding code.
1987
1988 2011-04-06  Adam Barth  <abarth@webkit.org>
1989
1990         Reviewed by Eric Seidel.
1991
1992         CSP object-src should block plugin loads
1993         https://bugs.webkit.org/show_bug.cgi?id=57283
1994
1995         This change is pretty straight-forward.  It's slighly unclear to me
1996         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
1997         added a FIXME comment, and I'll investigate that case more in the future.
1998
1999         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
2000
2001         * loader/DocumentWriter.cpp:
2002         (WebCore::DocumentWriter::begin):
2003         * loader/SubframeLoader.cpp:
2004         (WebCore::SubframeLoader::requestPlugin):
2005         * page/ContentSecurityPolicy.cpp:
2006         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2007         (WebCore::ContentSecurityPolicy::addDirective):
2008         * page/ContentSecurityPolicy.h:
2009
2010 2011-04-06  Beth Dakin  <bdakin@apple.com>
2011
2012         Reviewed by Dan Bernstein.
2013
2014         https://bugs.webkit.org/show_bug.cgi?id=58009
2015         Frame::scalePage() results in visual artifacts with scale factors less than 1
2016         -and corresponding-
2017         <rdar://problem/8683230>
2018
2019         Fall into the case where we fill with a background base color when there is a page 
2020         scale factor that is less than 1.
2021         * rendering/RenderView.cpp:
2022         (WebCore::RenderView::paintBoxDecorations):
2023
2024 2011-04-06  Jer Noble  <jer.noble@apple.com>
2025
2026         Reviewed by Darin Adler.
2027
2028         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
2029         https://bugs.webkit.org/show_bug.cgi?id=57982
2030
2031         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
2032
2033         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2034         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2035
2036 2011-04-06  Jer Noble  <jer.noble@apple.com>
2037
2038         Reviewed by Eric Carlson.
2039
2040         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
2041         https://bugs.webkit.org/show_bug.cgi?id=57919
2042
2043         Test: media/video-set-rate-from-pause.html
2044
2045         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
2046         of the media; instead a subclass must do that work.  So when setRate() is called, 
2047         inform a subclass through a new pure virtual updateRate() function that there's 
2048         work to be done.
2049
2050         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2051         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
2052         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2053         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
2054         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2055         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
2056
2057 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
2058
2059         Reviewed by David Levin.
2060
2061         Add QUOTA build flag for unified quota API
2062         https://bugs.webkit.org/show_bug.cgi?id=57918
2063
2064         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
2065         * GNUmakefile.am: Added QUOTA build flag
2066         * WebCore.pri: Added QUOTA build flag
2067
2068 2011-04-06  Stephanie Lewis  <slewis@apple.com>
2069
2070         Reviewed by Darin Adler.
2071
2072         https://bugs.webkit.org/show_bug.cgi?id=57997
2073         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
2074         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
2075         Cancel all enqueued events when detaching the Document the events cannot keep the Document
2076         alive.
2077
2078         No change in functionality so no new tests.  
2079
2080         * dom/Document.cpp:
2081         (WebCore::Document::detach):
2082         * dom/EventQueue.cpp:
2083         (WebCore::EventQueue::cancelQueuedEvents):
2084         * dom/EventQueue.h:
2085
2086 2011-04-06  Dan Bernstein  <mitz@apple.com>
2087
2088         Reviewed by Darin Adler.
2089
2090         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
2091         https://bugs.webkit.org/show_bug.cgi?id=58002
2092
2093         * platform/graphics/mac/SimpleFontDataMac.mm:
2094         (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
2095         does not require the vertical metrics tweaks that were needed in Leopard. That the
2096         tweaks were being applied went mostly unnoticed until r73993, because until then it
2097         only affected cases where Geeza Pro was specified, not when it occurred as a fallback
2098         font.
2099
2100 2011-04-06  Roland Steiner  <rolandsteiner@chromium.org>
2101
2102         Reviewed by Dimitri Glazkov.
2103
2104         Bug 57994 - Move guardRef functionality back to Document
2105         https://bugs.webkit.org/show_bug.cgi?id=57994
2106
2107         Move the relevant code parts from TreeScope back into Document.
2108
2109         No new tests. (no new functionality)
2110
2111         * dom/Document.cpp:
2112         (WebCore::Document::removedLastRef):
2113         * dom/Document.h:
2114         * dom/TreeScope.cpp:
2115         (WebCore::TreeScope::destroyTreeScopeData):
2116         * dom/TreeScope.h:
2117
2118 2011-04-06  Ian Henderson  <ianh@apple.com>
2119
2120         Reviewed by Simon Fraser, Antti Koivisto.
2121
2122         Fast path for parsing simple CSS values
2123         https://bugs.webkit.org/show_bug.cgi?id=57964
2124
2125         Add functions to parse simple color or dimension values, skipping the
2126         overhead of full CSS parsing.
2127
2128         Change parseValue to a static method to avoid unnecessary allocation
2129         of a CSSParser in the fast case.
2130
2131         * css/CSSMutableStyleDeclaration.cpp:
2132         (WebCore::CSSMutableStyleDeclaration::setProperty):
2133         Changed to use the new, static parseValue method.
2134         * css/CSSParser.cpp:
2135         (WebCore::isColorPropertyID):
2136         (WebCore::parseColorValue):
2137         Parses any color accepted by the existing parseColor() static method.
2138         We must handle color identifiers separately, since parseColor() will
2139         change 'red' into 'rgb(255, 0, 0)'.
2140         (WebCore::isSimpleLengthPropertyID):
2141         (WebCore::parseSimpleLengthValue):
2142         Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
2143         false, or 'NN' is '0').  Returns false to fall back to the slow path.
2144         (WebCore::CSSParser::parseValue):
2145         * css/CSSParser.h:
2146         * css/WebKitCSSMatrix.cpp:
2147         (WebCore::WebKitCSSMatrix::setMatrixValue):
2148         Changed to use the new, static parseValue method.
2149
2150 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
2151
2152         Reviewed by Darin Adler.
2153
2154         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
2155
2156         https://bugs.webkit.org/show_bug.cgi?id=27551
2157
2158         * config.h:
2159
2160 2011-04-06  Simon Fraser  <simon.fraser@apple.com>
2161
2162         Reviewed by Antti Koivisto.
2163
2164         Some minor style resolution optimizations
2165         https://bugs.webkit.org/show_bug.cgi?id=57996
2166
2167         A couple of minor optimizations to style-related code.
2168
2169         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2170         (WebCore::isCSSPropertyName):
2171         (WebCore::JSCSSStyleDeclaration::putDelegate):
2172         Avoid calling cssPropertyName() twice when setting style on an element.
2173         
2174         * css/CSSStyleSelector.cpp:
2175         (WebCore::useSVGZoomRules):
2176         (WebCore::CSSStyleSelector::applyProperty):
2177         Avoid calling isSVGElement() for every property, since only a two properties
2178         care about it.
2179
2180 2011-04-06  Ian Henderson  <ianh@apple.com>
2181
2182         Reviewed by Antti Koivisto.
2183
2184         Unnecessary string allocation in CSSStyleDeclaration::setProperty
2185         https://bugs.webkit.org/show_bug.cgi?id=57995
2186
2187         Pass the bool representing the property's importance directly instead
2188         of constructing a string.
2189
2190         * css/CSSStyleDeclaration.cpp:
2191         (WebCore::CSSStyleDeclaration::setProperty):
2192
2193 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
2194
2195         Reviewed by Steve Block.
2196
2197         Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
2198         https://bugs.webkit.org/show_bug.cgi?id=57963
2199
2200         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2201
2202         * bindings/v8/V8Utilities.h:
2203         (WebCore::createFunctionOnlyCallback):
2204         * bindings/v8/custom/V8GeolocationCustom.cpp:
2205         (WebCore::V8Geolocation::getCurrentPositionCallback):
2206         (WebCore::V8Geolocation::watchPositionCallback):
2207
2208 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
2209
2210         Reviewed by Adam Roben.
2211
2212         WebKit2: Support Windows 7 Gestures
2213         https://bugs.webkit.org/show_bug.cgi?id=49824
2214         <rdar://problem/8689728>
2215         
2216         Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
2217
2218         * WebCore.vcproj/WebCore.vcproj:
2219         * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
2220
2221 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
2222
2223         Reviewed by Andreas Kling.
2224
2225         [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2226         https://bugs.webkit.org/show_bug.cgi?id=57974
2227
2228         We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2229
2230         No new tests needed, just a config flag rename.
2231
2232         * features.pri:
2233
2234 2011-04-06  Tyler Close  <tjclose@chromium.org>
2235
2236         Reviewed by Nate Chapin.
2237
2238         run-bindings-tests reference files out of sync with CodeGenerator*.pm
2239         https://bugs.webkit.org/show_bug.cgi?id=57967
2240
2241         * bindings/scripts/test/V8/V8TestCallback.cpp:
2242
2243 2011-04-06  Asanka Herath  <asanka@chromium.org>
2244
2245         Reviewed by Darin Fisher.
2246
2247         Add new TargetType: TargetIsFavicon
2248
2249         https://bugs.webkit.org/show_bug.cgi?id=57659
2250
2251         No new functionality added, so no additional tests.
2252
2253         * platform/network/ResourceRequestBase.h:
2254
2255 2011-04-06  David Hyatt  <hyatt@apple.com>
2256
2257         Reviewed by Simon Fraser.
2258
2259         https://bugs.webkit.org/show_bug.cgi?id=57981
2260         
2261         Update the column count and width computation algorithm for CSS3 multi-column layout 
2262         to match the revised pseudo-algorithm in the latest draft of the spec.
2263
2264         * rendering/RenderBlock.cpp:
2265         (WebCore::RenderBlock::calcColumnWidth):
2266
2267 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
2268
2269         Reviewed by Eric Seidel.
2270
2271         borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
2272         https://bugs.webkit.org/show_bug.cgi?id=57965
2273
2274         Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
2275         from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
2276         instead of marginStartForChild and marginEndForChild respectively.
2277
2278         Calling these two functions on RenderInline is okay because writing-mode cannot differ
2279         from that of the containing block.
2280
2281         * rendering/RenderBlockLineLayout.cpp:
2282         (WebCore::borderPaddingMarginStart):
2283         (WebCore::borderPaddingMarginEnd):
2284         (WebCore::inlineLogicalWidth):
2285
2286 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2287
2288         Unreviewed, rolling out r83039.
2289         http://trac.webkit.org/changeset/83039
2290         https://bugs.webkit.org/show_bug.cgi?id=57978
2291
2292         introduced a new regression in conjunction to
2293         ReplaceSelectionCommand (Requested by rniwa on #webkit).
2294
2295         * editing/EditingStyle.cpp:
2296         (WebCore::EditingStyle::init):
2297         * editing/InsertParagraphSeparatorCommand.cpp:
2298         (WebCore::InsertParagraphSeparatorCommand::doApply):
2299
2300 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
2301
2302         Reviewed by David Levin.
2303
2304         Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
2305         https://bugs.webkit.org/show_bug.cgi?id=27658
2306
2307         Test: fast/events/select-element.html
2308
2309         * dom/SelectElement.cpp:
2310         (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
2311         (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
2312         (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
2313         And converted to a normal static function from a private function of SelectElement.
2314         (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
2315         And converted to a normal static function from a private function of SelectElement.
2316         (WebCore::firstSelectableListIndex): Returns the first selectable index.
2317         (WebCore::lastSelectableListIndex): Returns the last selectable index.
2318         (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
2319         (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
2320
2321         * dom/SelectElement.h:
2322         (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
2323
2324         * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
2325         They can differ due to the minimum size imposed by RenderListBox.
2326
2327 2011-04-06  David Hyatt  <hyatt@apple.com>
2328
2329         Reviewed by Dan Bernstein.
2330
2331         https://bugs.webkit.org/show_bug.cgi?id=57975
2332
2333         The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
2334         to just look at the style, so that it can find the InlineTextBox and not care that it's a child
2335         of the link element and not the line box for the link element itself (since that line box got
2336         culled).
2337
2338         * rendering/RenderFlexibleBox.cpp:
2339         (WebCore::RenderFlexibleBox::applyLineClamp):
2340
2341 2011-04-06  Brady Eidson  <beidson@apple.com>
2342
2343         Reviewed by Anders Carlsson.
2344
2345         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
2346         WK2 icon database should be able to get a CGImage of a specific size
2347
2348         * platform/graphics/BitmapImage.h:
2349         * platform/graphics/Image.h:
2350         (WebCore::Image::getFirstCGImageRefOfSize):
2351         
2352         * platform/graphics/cg/ImageCG.cpp:
2353         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
2354           first frame of the requested size.
2355
2356 2011-04-06  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
2357
2358         Reviewed by Kevin Ollivier.
2359
2360         [wx] Fix cursor handling so that we always call the chrome to set it.
2361         
2362         https://bugs.webkit.org/show_bug.cgi?id=57972
2363
2364         * platform/wx/WidgetWx.cpp:
2365         (WebCore::Widget::setCursor):
2366
2367 2011-04-06  David Hyatt  <hyatt@apple.com>
2368
2369         Reviewed by Dan Bernstein.
2370
2371         https://bugs.webkit.org/show_bug.cgi?id=41445
2372         
2373         Visited links painting with black background. Make sure that if the visited style has
2374         the initial background color (transparent) set that we just use the unvisited color.
2375
2376         Added fast/history/visited-link-background-color.html
2377
2378         * rendering/style/RenderStyle.cpp:
2379         (WebCore::RenderStyle::visitedDependentColor):
2380
2381 2011-04-06  Csaba Osztrogon√°c  <ossy@webkit.org>
2382
2383         Unreviewed Qt buildfix after r83079.
2384
2385         * WebCore.pro:
2386
2387 2011-04-06  Dean Jackson  <dino@apple.com>
2388
2389         Reviewed by Chris Marrin.
2390
2391         https://bugs.webkit.org/show_bug.cgi?id=56936
2392         Crash in ImplicitAnimation::~ImplicitAnimation
2393
2394         Make sure the style and start time waiting lists
2395         are cleared in the CompositeAnimation destructor. This
2396         way, no running transitions can be left in a state
2397         where they are destroyed as the AnimationControllerPrivate
2398         cleans up.
2399
2400         * page/animation/CompositeAnimation.cpp:
2401         (WebCore::CompositeAnimation::~CompositeAnimation):
2402
2403 2011-04-06  Robert Sesek  <rsesek@chromium.org>
2404
2405         Reviewed by Alexey Proskuryakov.
2406
2407         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
2408         https://bugs.webkit.org/show_bug.cgi?id=54969
2409
2410         No change in behavior; no new tests.
2411
2412         * editing/TextIterator.cpp:
2413         (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
2414         * editing/TextIterator.h:
2415         * page/Frame.cpp:
2416         (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
2417
2418 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
2419
2420         Reviewed by Steve Block.
2421
2422         Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
2423         https://bugs.webkit.org/show_bug.cgi?id=57770
2424
2425         Create a template from an existing functionality in JSGeolocationCustom.cpp
2426         to be used by the custom bindings of both Geolocation and the Media Stream API.
2427         V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
2428
2429         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2430
2431         * Android.jscbindings.mk:
2432         * CMakeLists.txt:
2433         * GNUmakefile.am:
2434         * WebCore.gypi:
2435         * WebCore.pro:
2436         * WebCore.vcproj/WebCore.vcproj:
2437         * WebCore.xcodeproj/project.pbxproj:
2438         * bindings/js/CallbackFunction.cpp: Added.
2439         (WebCore::checkFunctionOnlyCallback):
2440         * bindings/js/CallbackFunction.h: Added.
2441         (WebCore::createFunctionOnlyCallback):
2442         * bindings/js/JSBindingsAllInOne.cpp:
2443         * bindings/js/JSGeolocationCustom.cpp:
2444         (WebCore::JSGeolocation::getCurrentPosition):
2445         (WebCore::JSGeolocation::watchPosition):
2446
2447 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
2448
2449         Reviewed by Andreas Kling.
2450
2451         [Qt] Implement fullscreen playback for the GStreamer backend.
2452         https://bugs.webkit.org/show_bug.cgi?id=56826
2453
2454         Implement support for fullscreen playback when building the
2455         Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
2456         The implementation is done in FullScreenVideoQt alongside with
2457         the Qt Multimedia support.
2458
2459         No new tests because layout tests cover it. They are not yet activated
2460         but will be any time soon.
2461
2462         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
2463         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2464         (FullScreenVideoWindow::FullScreenVideoWindow):
2465         (FullScreenVideoWindow::setVideoElement):
2466         (FullScreenVideoWindow::closeEvent):
2467         (FullScreenVideoWindow::keyPressEvent):
2468         (FullScreenVideoWindow::event):
2469         (FullScreenVideoWindow::showFullScreen):
2470         (FullScreenVideoWindow::hideCursor):
2471         (FullScreenVideoWindow::showCursor):
2472
2473 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
2474
2475         Reviewed by Dimitri Glazkov.
2476
2477         Bundle lineLeftOffset and lineRightOffset as a class
2478         https://bugs.webkit.org/show_bug.cgi?id=57851
2479
2480         Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
2481         The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
2482         and only the difference is used to compute the width.
2483
2484         * rendering/RenderBlock.h:
2485         * rendering/RenderBlockLineLayout.cpp:
2486         (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
2487         (WebCore::LineOffsets::LineOffsets): Added.
2488         (WebCore::LineOffsets::width): Added.
2489         (WebCore::LineOffsets::setLeft): Added.
2490         (WebCore::LineOffsets::setRight): Added.
2491         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
2492         (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
2493
2494 2011-04-06  David Hyatt  <hyatt@apple.com>
2495
2496         Reviewed by Dan Bernstein.
2497
2498         https://bugs.webkit.org/show_bug.cgi?id=57916
2499         
2500         Implement an optimization to the line box tree to cull out most of the intermediate
2501         line boxes that can occur between the root line box and the leaves of the tree (images
2502         and text).
2503
2504         RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
2505         that starts off as false. Only if it gets flipped to true will there be any line boxes
2506         created for that RenderInline.
2507         
2508         * page/FocusController.cpp:
2509         (WebCore::FocusController::advanceFocusDirectionally):
2510         Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
2511         is up to date.
2512
2513         * page/SpatialNavigation.cpp:
2514         (WebCore::hasOffscreenRect):
2515         (WebCore::nodeRectInAbsoluteCoordinates):
2516         Add asserts in spatial navigation code to catch any future bad queries that might be made
2517         for rectangles without layout being up to date.
2518
2519         * platform/graphics/FloatRect.cpp:
2520         (WebCore::FloatRect::uniteIfNonZero):
2521         * platform/graphics/FloatRect.h:
2522         * platform/graphics/IntRect.cpp:
2523         (WebCore::IntRect::uniteIfNonZero):
2524         * platform/graphics/IntRect.h:
2525         Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
2526         version allows rect unites to happen if either width or height is nonzero.
2527
2528         * rendering/HitTestResult.cpp:
2529         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2530         Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
2531         if content inside those inlines is hit.
2532
2533         * rendering/InlineBox.h:
2534         (WebCore::InlineBox::logicalFrameRect):
2535         Fix a bug in this function for obtaining the logical frame rect of an inline box.
2536
2537         * rendering/InlineFlowBox.cpp:
2538         (WebCore::InlineFlowBox::addToLine):
2539         addToLine now also checks line gap in the line box tree optimization checks.
2540     
2541         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2542         (WebCore::InlineFlowBox::computeOverflow):
2543         * rendering/InlineFlowBox.h:
2544         Rewritten to add the text box overflow to the text box itself.
2545
2546          * rendering/InlineTextBox.cpp:
2547         (WebCore::InlineTextBox::destroy):
2548         Destroy has been changed to call a helper function to remove and destroy the line boxes that
2549         is now called from one additional spot.
2550
2551         (WebCore::InlineTextBox::logicalOverflowRect):
2552         (WebCore::InlineTextBox::setLogicalOverflowRect):
2553         Text boxes now cache their own overflow in a global hash table.
2554
2555         (WebCore::InlineTextBox::baselinePosition):
2556         (WebCore::InlineTextBox::lineHeight):
2557         Changed to not assume that the parent line box's renderer is the RenderText's immediate
2558         parent, since intermediate line boxes may have been culled.
2559
2560         (WebCore::InlineTextBox::paint):
2561         Paint now properly checks only the text box overflow instead of the parent line box's overflow.
2562
2563         * rendering/InlineTextBox.h:
2564         (WebCore::InlineTextBox::logicalTopVisualOverflow):
2565         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
2566         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
2567         (WebCore::InlineTextBox::logicalRightVisualOverflow):
2568         New accessors to obtain overflow for inline text boxes.
2569
2570         * rendering/RenderBlock.cpp:
2571         (WebCore::RenderBlock::updateFirstLetter):
2572         updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
2573         text boxes may not have anything in between them and the block that contains the inline first letter
2574         container.
2575
2576         * rendering/RenderBlockLineLayout.cpp:
2577         (WebCore::RenderBlock::createLineBoxes):
2578         The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
2579         be created.
2580
2581         (WebCore::RenderBlock::layoutInlineChildren):
2582         The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
2583         This is done before any lines are built.
2584
2585         * rendering/RenderInline.cpp:
2586         (WebCore::RenderInline::RenderInline):
2587         The new m_alwaysCreateLineBoxes flag has been added to the constructor.
2588
2589         (WebCore::RenderInline::styleDidChange):
2590         An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
2591         (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
2592         the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
2593
2594         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2595         The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
2596         vertical alignment, line height, etc.).
2597
2598         (WebCore::RenderInline::absoluteRects):
2599         (WebCore::RenderInline::culledInlineAbsoluteRects):
2600         absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
2601
2602         (WebCore::RenderInline::absoluteQuads):
2603         (WebCore::RenderInline::culledInlineAbsoluteQuads):
2604         absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
2605
2606         (WebCore::RenderInline::offsetLeft):
2607         (WebCore::RenderInline::offsetTop):
2608         offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
2609
2610         (WebCore::RenderInline::linesBoundingBox):
2611         (WebCore::RenderInline::culledInlineBoundingBox):
2612         lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
2613
2614         (WebCore::RenderInline::culledInlineFirstLineBox):
2615         (WebCore::RenderInline::culledInlineLastLineBox):
2616         Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
2617         lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
2618
2619         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
2620         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
2621         linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
2622
2623         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2624         The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
2625
2626         (WebCore::RenderInline::dirtyLineBoxes):
2627         dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
2628         m_alwaysCreateLineBoxes is false.
2629
2630         (WebCore::RenderInline::createAndAppendInlineFlowBox):
2631         Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
2632         when line-box-contain is set to an unusual value.
2633
2634         (WebCore::RenderInline::addFocusRingRects):
2635         Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
2636
2637         * rendering/RenderInline.h:
2638         (WebCore::RenderInline::firstLineBoxIncludingCulling):
2639         (WebCore::RenderInline::lastLineBoxIncludingCulling):
2640         Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
2641         is all that needs checking.
2642
2643         (WebCore::RenderInline::alwaysCreateLineBoxes):
2644         (WebCore::RenderInline::setAlwaysCreateLineBoxes):
2645         Functions for getting and setting the m_alwaysCreateLineBoxes flag.
2646
2647         * rendering/RenderLineBoxList.cpp:
2648         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2649         Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
2650         lines get dirtied.
2651
2652         * rendering/RenderText.cpp:
2653         (WebCore::RenderText::removeAndDestroyTextBoxes):
2654         New helper invoked by destroy and also from updateFirstLetter.
2655
2656         (WebCore::RenderText::destroy):
2657         Changed to call removeAndDestroyTextBoxes.
2658
2659         (WebCore::RenderText::absoluteRects):
2660         Fixed to be properly physical instead of logical.
2661
2662         (WebCore::RenderText::linesVisualOverflowBoundingBox):
2663         New implementation for RenderText that gives the bounding box of the text boxes including overflow from
2664         shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.
2665
2666         * rendering/RenderText.h:
2667         * rendering/svg/RenderSVGInline.cpp:
2668         (WebCore::RenderSVGInline::RenderSVGInline):
2669         RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
2670
2671         * rendering/svg/SVGRootInlineBox.cpp:
2672         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
2673         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2674         Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
2675         now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
2676
2677 2011-04-05  Enrica Casucci  <enrica@apple.com>
2678
2679         Reviewed by Darin Adler.
2680
2681         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
2682         https://bugs.webkit.org/show_bug.cgi?id=57909
2683         <rdar://problem/9103220>
2684
2685         In WebKit2 we cannot rely on the value returned by platformData() that
2686         on Mac returns an NSDraggingInfo object. This is available only in the UI
2687         process. Therefore we should use m_pasteboard instead.
2688         We cannot change what platformData() returns on Mac, since there are
2689         delegate methods that receive a NSDraggingInfo object (only in WebKit).
2690         
2691         * platform/DragData.h:
2692         (WebCore::DragData::pasteboard): Added.
2693         * platform/mac/ClipboardMac.mm:
2694         (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
2695         * platform/mac/DragDataMac.mm:
2696         (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
2697         (WebCore::DragData::asURL): Same as above.
2698
2699 2011-04-06  Benjamin Poulain  <benjamin.poulain@nokia.com>
2700
2701         Reviewed by Darin Adler.
2702
2703         ClipboardWin has unused variables "ExceptionCode ec"
2704         https://bugs.webkit.org/show_bug.cgi?id=57952
2705
2706         Remove the unused variable.
2707
2708         * platform/win/ClipboardWin.cpp:
2709         (WebCore::ClipboardWin::declareAndWriteDragImage):
2710         (WebCore::ClipboardWin::writePlainText):
2711
2712 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
2713
2714         Reviewed by Dimitri Glazkov.
2715
2716         Split getBorderPaddingMargin into two functions
2717         https://bugs.webkit.org/show_bug.cgi?id=57947
2718
2719         * rendering/RenderBlockLineLayout.cpp:
2720         (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
2721         (WebCore::borderPaddingMarginEnd): Ditto.
2722         (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
2723         (WebCore::RenderBlock::findNextLineBreak): Ditto.
2724
2725 2011-04-06  MORITA Hajime  <morrita@google.com>
2726
2727         Reviewed by Dimitri Glazkov.
2728
2729         [Refactoring] <progress> should not have manual layout code.
2730         https://bugs.webkit.org/show_bug.cgi?id=57801
2731
2732         - Simplified RenderProgress, removing its custom layout code
2733         - Introducing ProgressValueElement and ProgressBarElement, replacing
2734           ProgressBarValueElement. 
2735         
2736         Now the structure is almost identical to <meter>, 
2737         other than:
2738         - RenderProgress has animated painting, thus manages its own timer.
2739         - Both ProgressValueElement and ProgressBarElement has pseudo classes
2740           which don't changes during its lifetime.
2741        
2742         * Android.mk:
2743         * CMakeLists.txt:
2744         * GNUmakefile.am:
2745         * WebCore.gypi:
2746         * WebCore.pro:
2747         * WebCore.vcproj/WebCore.vcproj:
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * css/html.css:
2750         (progress):
2751         (progress::-webkit-progress-bar):
2752         (progress::-webkit-progress-value):
2753         * html/HTMLProgressElement.cpp:
2754         (WebCore::HTMLProgressElement::~HTMLProgressElement):
2755         (WebCore::HTMLProgressElement::create):
2756         (WebCore::HTMLProgressElement::attach):
2757         (WebCore::HTMLProgressElement::didElementStateChange):
2758         (WebCore::HTMLProgressElement::createShadowSubtree):
2759         * html/HTMLProgressElement.h:
2760         * html/shadow/ProgressShadowElement.cpp: Copied from Source/WebCore/html/shadow/ProgressBarValueElement.h.
2761         (WebCore::ProgressShadowElement::ProgressShadowElement):
2762         (WebCore::ProgressShadowElement::progressElement):
2763         (WebCore::ProgressShadowElement::rendererIsNeeded):
2764         (WebCore::ProgressBarElement::shadowPseudoId):
2765         (WebCore::ProgressValueElement::shadowPseudoId):
2766         (WebCore::ProgressValueElement::setWidthPercentage):
2767         * html/shadow/ProgressShadowElement.h: Renamed from Source/WebCore/html/shadow/ProgressBarValueElement.h.
2768         (WebCore::ProgressBarElement::ProgressBarElement):
2769         (WebCore::ProgressBarElement::create):
2770         (WebCore::ProgressValueElement::ProgressValueElement):
2771         (WebCore::ProgressValueElement::create):
2772         * rendering/RenderProgress.cpp:
2773         (WebCore::RenderProgress::RenderProgress):
2774         (WebCore::RenderProgress::updateFromElement):
2775         (WebCore::RenderProgress::animationTimerFired):
2776         * rendering/RenderProgress.h:
2777         (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
2778         (WebCore::RenderProgress::canHaveChildren):
2779
2780 2011-04-06  Mario Sanchez Prada  <msanchez@igalia.com>
2781
2782         Reviewed by Chris Fleizach.
2783
2784         [GTK] Do not reference AccessibilityRenderObject from platform dependent code
2785         https://bugs.webkit.org/show_bug.cgi?id=57955
2786
2787         Do not reference AccessibilityRenderObject from platform specific code
2788
2789         Added new virtual functions to AccessibilityObject.h and removed
2790         explicit references to AccessibilityRenderObject from GTK code.
2791
2792         * accessibility/AccessibilityObject.h:
2793         (WebCore::AccessibilityObject::renderer): New virtual method,
2794         returning 0 by default. Overriden by AccessibilityRenderObject.
2795         (WebCore::AccessibilityObject::correspondingLabelForControlElement):
2796         New virtual method, returning 0 by default. It complements the
2797         already present method correspondingControlForLabelElement().
2798
2799         * accessibility/AccessibilityRenderObject.h:
2800         (WebCore::AccessibilityRenderObject::renderer): Made virtual.
2801
2802         * accessibility/gtk/AXObjectCacheAtk.cpp:
2803         (WebCore::emitTextChanged): Reference  AccessibilityObject,
2804         instead of AccessibilityRenderObject.
2805         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2806         Ditto.
2807
2808         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2809         (webkit_accessible_get_name): Do not reference
2810         AccessibilityRenderObject.
2811         (webkit_accessible_get_description): Ditto.
2812         (setAtkRelationSetFromCoreObject): Ditto.
2813         (optionFromList): Ditto.
2814         (optionFromSelection): Ditto.
2815         (webkit_accessible_selection_clear_selection): Ditto.
2816         (webkit_accessible_selection_get_selection_count): Ditto.
2817         (webkit_accessible_selection_select_all_selection): Ditto.
2818         (textForObject): Ditto.
2819         (webkit_accessible_text_get_text): Ditto.
2820         (getPangoLayoutForAtk): Ditto.
2821         (webkit_accessible_text_get_caret_offset): Ditto.
2822         (baselinePositionForRenderObject): Ditto.
2823         (getAttributeSetForAccessibilityObject): Ditto.
2824         (accessibilityObjectLength): Ditto.
2825         (getSelectionOffsetsForObject): Ditto.
2826         (webkit_accessible_text_set_selection): Ditto.
2827         (webkit_accessible_text_set_caret_offset): Ditto.
2828         (webkit_accessible_table_get_caption): Ditto.
2829         (getInterfaceMaskFromObject): Ditto.
2830
2831         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
2832         (getRangeLengthForObject): Ditto.
2833
2834         Removed unused renderer() method from AccessibilityMenuList.
2835
2836         * accessibility/AccessibilityMenuList.h: Removed unused method.
2837         * accessibility/AccessibilityMenuList.cpp: Removed unused method.
2838
2839 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
2840
2841         Reviewed by Pavel Feldman.
2842
2843         Web Inspector: Javascipt warning link expand and overlap with icons in js console
2844         https://bugs.webkit.org/show_bug.cgi?id=57939
2845
2846         * inspector/front-end/inspector.js:
2847         (WebInspector.linkifyURLAsNode):
2848
2849 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
2850
2851         Reviewed by Pavel Feldman.
2852
2853         Web Inspector: Beautify parameter names in Inspector.json (CSS domain)
2854         https://bugs.webkit.org/show_bug.cgi?id=57931
2855
2856         * inspector/Inspector.json:
2857
2858 2011-04-06  Jia Pu  <jpu@apple.com>
2859
2860         Reviewed by Darin Adler.
2861
2862         [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
2863         https://bugs.webkit.org/show_bug.cgi?id=57665
2864         <rdar://problem/7350477>
2865
2866         We need to track how user modified an autocorrected word. If he changed it back to original
2867         text, we want to record AutocorrectionReverted response. And if he changed it to something
2868         else, we want to record AutocorrectionEdited response.
2869
2870         To achieve this, we need to distringuish between text replacement caused by autocorrection
2871         from that due to other causes, such as reversion, text substitution, etc. So we added a new
2872         marker type "Autocorrected". We also need to be able to check for correction, even when we
2873         don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
2874         value, "CheckForCorrection".
2875
2876         We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
2877         specified range, and of specified type.
2878
2879         * dom/DocumentMarker.h:
2880         * dom/DocumentMarkerController.cpp:
2881         (WebCore::DocumentMarkerController::markersInRange):
2882         (WebCore::DocumentMarkerController::hasMarkers):
2883         * dom/DocumentMarkerController.h:
2884         * editing/Editor.cpp:
2885         (WebCore::markerTypesForAutocorrection):
2886         (WebCore::markersHaveIdenticalDescription):
2887         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2888         (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
2889         (WebCore::Editor::changeBackToReplacedString):
2890         (WebCore::Editor::markMisspellingsAndBadGrammar):
2891         (WebCore::Editor::applyCorrectionPanelInfo):
2892         (WebCore::Editor::unappliedSpellCorrection):
2893         (WebCore::Editor::textCheckingTypeMaskFor):
2894         * editing/Editor.h:
2895         * editing/SpellingCorrectionCommand.cpp:
2896         (WebCore::SpellingCorrectionCommand::doApply):
2897
2898 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2899
2900         Unreviewed, rolling out r83045.
2901         http://trac.webkit.org/changeset/83045
2902         https://bugs.webkit.org/show_bug.cgi?id=57953
2903
2904         Broke win layout tests (Requested by podivilov on #webkit).
2905
2906         * GNUmakefile.am:
2907         * inspector/front-end/DebuggerPresentationModel.js:
2908         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2909         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2910
2911 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
2912
2913         Moved the declaration of positionNewFloatOnLine in RenderBlock.h after r83042.
2914
2915         * rendering/RenderBlock.h:
2916
2917 2011-03-27  Diego Gonzalez  <diegohcg@webkit.org>
2918
2919         Reviewed by Kenneth Rohde Christiansen.
2920
2921         [Qt] Re-draw the <input> fields for Qt Mobile Theme to do not override elements already styled.
2922         https://bugs.webkit.org/show_bug.cgi?id=57007
2923
2924         * CodeGenerators.pri:
2925         * css/themeQtMobile.css: Removed.
2926         * platform/qt/QtMobileWebStyle.cpp:
2927         (drawRectangularControlBackground):
2928         (QtMobileWebStyle::drawPrimitive):
2929         (QtMobileWebStyle::drawComplexControl):
2930         * platform/qt/QtMobileWebStyle.h:
2931         * platform/qt/RenderThemeQt.cpp:
2932         (WebCore::RenderThemeQt::isControlStyled):
2933         (WebCore::RenderThemeQt::paintTextField):
2934
2935 2011-04-06  Jia Pu  <jpu@apple.com>
2936
2937         Reviewed by Darin Adler.
2938
2939         [Mac] When autocorrection occurs without showing correction panel, WebCore need to post accessibility notification.
2940         https://bugs.webkit.org/show_bug.cgi?id=57800
2941         <rdar://problem/9218223>
2942
2943         Defined a new accessibility notification type, AXAutocorrectionOccured. Editor::markAllMisspellingsAndBadGrammarInRanges()
2944         now posts said notification when any autocorrection or text replacement (e.g. replacing "(c)" with copyright mark) takes place.
2945
2946         * accessibility/AXObjectCache.h:
2947         * accessibility/chromium/AXObjectCacheChromium.cpp:
2948         (WebCore::AXObjectCache::postPlatformNotification):
2949         * accessibility/mac/AXObjectCacheMac.mm:
2950         (WebCore::AXObjectCache::postPlatformNotification):
2951         * editing/Editor.cpp:
2952         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2953
2954 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
2955
2956         Build fix for debug Cairo builds.
2957
2958         * platform/graphics/cairo/PlatformContextCairo.cpp:
2959         (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
2960
2961 2011-04-06  Diego Gonzalez  <diegohcg@webkit.org>
2962
2963         Reviewed by Antonio Gomes.
2964
2965         [Qt] Style fix for QtMobileWebStyle.h
2966         https://bugs.webkit.org/show_bug.cgi?id=57708
2967
2968         * platform/qt/QtMobileWebStyle.h:
2969
2970 2011-04-06  Andras Becsi  <abecsi@webkit.org>
2971
2972         Reviewed by Darin Adler.
2973
2974         Invalid color #{predefined colorName} is accepted by the CSS parser.
2975         https://bugs.webkit.org/show_bug.cgi?id=15360
2976
2977         Test: fast/css/invalid-predefined-color.html
2978
2979         * css/CSSGrammar.y: Remove superfluous hexcolor production.
2980         * css/tokenizer.flex: A hexadecimal number should consist of [a-fA-F0-9] values ({h}).
2981
2982 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
2983
2984         Reviewed by Pavel Feldman.
2985
2986         Web Inspector: add test for script formatter worker.
2987         https://bugs.webkit.org/show_bug.cgi?id=57447
2988
2989         Test: inspector/debugger/script-formatter.html
2990
2991         * GNUmakefile.am:
2992         * inspector/front-end/DebuggerPresentationModel.js:
2993         (WebInspector.DebuggerPresentationModel):
2994         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2995
2996 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
2997
2998         Reviewed by Xan Lopez.
2999
3000         [Cairo] Hide the details of image masking in PlatformContextCairo
3001         https://bugs.webkit.org/show_bug.cgi?id=57878
3002
3003         No new tests. This is just a refactor.
3004
3005         * platform/graphics/GraphicsContext.h:
3006         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3007         (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
3008         do the actual cairo_save. Remove information about image masking.
3009         (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
3010         do the actual cairo_restore. Remove information about image masking.
3011         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3012         * platform/graphics/cairo/ImageBufferCairo.cpp:
3013         (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
3014         * platform/graphics/cairo/PlatformContextCairo.cpp:
3015         (WebCore::PlatformContextCairo::restore): Added.
3016         (WebCore::PlatformContextCairo::save): Added.
3017         (WebCore::PlatformContextCairo::pushImageMask): Added.
3018         * platform/graphics/cairo/PlatformContextCairo.h:
3019         (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
3020         (WebCore::ImageMaskInformation::isValid): Ditto.
3021         (WebCore::ImageMaskInformation::maskSurface): Ditto.
3022         (WebCore::ImageMaskInformation::maskRect): Ditto.
3023
3024 2011-04-02  Diego Gonzalez  <diegohcg@webkit.org>
3025
3026         Reviewed by Csaba Osztrogon√°c.
3027
3028         [Qt] Radio buttons are showing wrong with mobile theme
3029         https://bugs.webkit.org/show_bug.cgi?id=57706
3030
3031         * platform/qt/QtMobileWebStyle.cpp:
3032         (QtMobileWebStyle::drawRadio):
3033
3034 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3035
3036         Reviewed by Eric Seidel.
3037
3038         Move RenderBlock::positionNewFloatOnLine to RenderBlockLineLayout.cpp
3039         https://bugs.webkit.org/show_bug.cgi?id=57943
3040
3041         * rendering/RenderBlock.cpp: Removed positionNewFloatOnLine.
3042         * rendering/RenderBlockLineLayout.cpp:
3043         (WebCore::RenderBlock::positionNewFloatOnLine): Moved from RenderBlock.cpp
3044
3045 2011-04-05  Diego Gonzalez  <diegohcg@webkit.org>
3046
3047         Buildfix after r82125.
3048
3049         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
3050         https://bugs.webkit.org/show_bug.cgi?id=57087
3051
3052         * platform/qt/QtMobileWebStyle.cpp:
3053         (QtMobileWebStyle::findChecker):
3054         (QtMobileWebStyle::findRadio):
3055         (QtMobileWebStyle::findComboButton):
3056
3057 2011-04-06  Pavel Podivilov  <podivilov@chromium.org>
3058
3059         Reviewed by Yury Semikhatsky.
3060
3061         Web Inspector: inline script imports in ScriptFormatterWorker.js so it works in Safari release.
3062         https://bugs.webkit.org/show_bug.cgi?id=57641
3063
3064         * WebCore.xcodeproj/project.pbxproj:
3065         * gyp/streamline-inspector-source.sh:
3066         * inspector/combine-javascript-resources.pl: Renamed from Source/WebCore/combine-javascript-resources.
3067         * inspector/inline-javascript-imports.py: Added.
3068
3069 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3070
3071         Reviewed by Eric Seidel.
3072
3073         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
3074         https://bugs.webkit.org/show_bug.cgi?id=57872
3075
3076         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
3077         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
3078
3079         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
3080         avoiding the tab span.
3081
3082         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
3083
3084         Test: editing/inserting/insert-paragraph-separator-tab-span.html
3085
3086         * editing/EditingStyle.cpp:
3087         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
3088         * editing/InsertParagraphSeparatorCommand.cpp:
3089         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
3090         separator into a paragraph separator.
3091
3092 2011-04-06  Levi Weintraub  <leviw@chromium.org>
3093
3094         Reviewed by Ryosuke Niwa.
3095
3096         Add member functions for determining line/paragraph separation to InlineIterator
3097         https://bugs.webkit.org/show_bug.cgi?id=57938
3098
3099         Adding atTextParagraphSeparator and atParagraphSeparator inline convenience functions to
3100         InlineIterator, where it makes far more sense for them to be. Also moving
3101         shouldPreserveNewline to RenderObject and renaming it preservesNewline.
3102
3103         No new tests as this provides no new functionality.
3104
3105         * rendering/InlineIterator.h:
3106         (WebCore::InlineIterator::atTextParagraphSeparator):
3107         (WebCore::InlineIterator::atParagraphSeparator):
3108         * rendering/RenderBlockLineLayout.cpp:
3109         (WebCore::RenderBlock::requiresLineBox):
3110         (WebCore::RenderBlock::findNextLineBreak):
3111         * rendering/RenderObject.h:
3112         (WebCore::RenderObject::preservesNewline):
3113
3114 2011-04-05  Alexander Pavlov  <apavlov@chromium.org>
3115
3116         Reviewed by Pavel Feldman.
3117
3118         Web Inspector: Range insertNode function does not update content in the inspector
3119         https://bugs.webkit.org/show_bug.cgi?id=57829
3120
3121         * inspector/InspectorDOMAgent.cpp:
3122         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
3123         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
3124
3125 2011-04-06  Alejandro G. Castro  <alex@igalia.com>
3126
3127         Fix GTK3 compilation after r82962.
3128
3129         * platform/gtk/RenderThemeGtk3.cpp:
3130         (WebCore::paintToggle):
3131         (WebCore::renderButton):
3132         (WebCore::RenderThemeGtk::paintMenuList):
3133         (WebCore::RenderThemeGtk::paintTextField):
3134         (WebCore::RenderThemeGtk::paintSliderTrack):
3135         (WebCore::RenderThemeGtk::paintSliderThumb):
3136         (WebCore::RenderThemeGtk::paintProgressBar):
3137         (WebCore::paintSpinArrowButton):
3138         * platform/gtk/ScrollbarThemeGtk3.cpp:
3139         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
3140         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
3141         (WebCore::ScrollbarThemeGtk::paintThumb):
3142         (WebCore::ScrollbarThemeGtk::paintButton):
3143
3144 2011-04-06  Andrey Kosyakov  <caseq@chromium.org>
3145
3146         Reviewed by Yury Semikhatsky.
3147
3148         Web Inspector: [Extensions API] remove inspectedPage.* events
3149         https://bugs.webkit.org/show_bug.cgi?id=57763
3150
3151         - Removed webInspector.inspectedPage.* events
3152         - moved onNavigated to webInspector.resources
3153
3154         * inspector/front-end/ExtensionAPI.js:
3155         (WebInspector.injectedExtensionAPI):
3156         (WebInspector.injectedExtensionAPI.InspectedWindow):
3157         * inspector/front-end/ExtensionAPISchema.json:
3158         * inspector/front-end/ExtensionServer.js:
3159         (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
3160         * inspector/front-end/inspector.js:
3161         (WebInspector.domContentEventFired):
3162         (WebInspector.loadEventFired):
3163         (WebInspector.inspectedURLChanged):
3164
3165 2011-04-06  Joseph Pecoraro  <joepeck@webkit.org>
3166
3167         Reviewed by Antti Koivisto.
3168
3169         Add <head> to the simpleUserAgentStyleSheet
3170         https://bugs.webkit.org/show_bug.cgi?id=57915
3171
3172         * css/CSSStyleSelector.cpp:
3173         (WebCore::elementCanUseSimpleDefaultStyle): add head to the
3174         simple stylesheet, display:none.
3175
3176 2011-04-05  Mikhail Naganov  <mnaganov@chromium.org>
3177
3178         Reviewed by Pavel Feldman.
3179
3180         Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
3181         https://bugs.webkit.org/show_bug.cgi?id=57856
3182
3183         Test: inspector/profiler/detailed-heapshots-summary.html
3184
3185         * inspector/front-end/DataGrid.js:
3186         (WebInspector.DataGrid):
3187         * inspector/front-end/DetailedHeapshotGridNodes.js:
3188         (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
3189         (WebInspector.HeapSnapshotGridNode.prototype._populate):
3190         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
3191         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
3192         (WebInspector.HeapSnapshotGridNode.prototype.sort):
3193         (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
3194         * inspector/front-end/DetailedHeapshotView.js:
3195         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
3196         * inspector/front-end/ProfilesPanel.js:
3197         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
3198         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
3199
3200 2011-04-06  Anders Bakken  <agbakken@gmail.com>
3201
3202         Reviewed by David Levin.
3203
3204         [Qt] SmartReplaceQt.cpp has coding-style errors
3205         https://bugs.webkit.org/show_bug.cgi?id=40261
3206
3207         This patch does not require new test cases.
3208
3209         * editing/qt/SmartReplaceQt.cpp:
3210         (WebCore::isCharacterSmartReplaceExempt):
3211
3212 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
3213
3214         Reviewed by Ryosuke Niwa.
3215
3216         REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
3217         https://bugs.webkit.org/show_bug.cgi?id=57755
3218
3219         Test: editing/execCommand/insert-line-break-onload.html
3220
3221         * editing/TypingCommand.cpp:
3222         (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
3223
3224 2011-04-05  Antti Koivisto  <antti@apple.com>
3225
3226         Reviewed by Cameron Zwarich.
3227
3228         Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
3229         https://bugs.webkit.org/show_bug.cgi?id=57914
3230
3231         Don't call adjustedDeferredRepaintDelay unnecessarily.
3232
3233         * page/FrameView.cpp:
3234         (WebCore::FrameView::repaintContentRectangle):
3235         (WebCore::FrameView::adjustedDeferredRepaintDelay):
3236
3237 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
3238
3239         Reviewed by David Levin.
3240
3241         Update call to SkAdvancedTypefaceMetrics to new API.
3242         https://bugs.webkit.org/show_bug.cgi?id=57887
3243
3244         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
3245         (WebCore::FontPlatformData::emSizeInFontUnits):
3246
3247 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
3248
3249         Reviewed by Darin Adler.
3250
3251         Rename event dispatching functions after form event removal
3252         https://bugs.webkit.org/show_bug.cgi?id=57908
3253
3254         * dom/InputElement.cpp:
3255         (WebCore::InputElement::setValueFromRenderer):
3256         * dom/Node.cpp:
3257         (WebCore::Node::dispatchChangeEvent):
3258         (WebCore::Node::dispatchInputEvent):
3259         (WebCore::Node::defaultEventHandler):
3260         * dom/Node.h:
3261         * html/HTMLFormControlElement.cpp:
3262         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
3263         (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
3264         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
3265         Renamed "events" to "event", since there is only one event to dispatch now.
3266
3267 2011-04-05  Anders Bakken  <agbakken@gmail.com>
3268
3269         Reviewed by David Levin.
3270
3271         [Qt] DragControllerQt.cpp has coding-style errors
3272         https://bugs.webkit.org/show_bug.cgi?id=40258
3273
3274         This patch does not require new test cases.
3275
3276         * page/qt/DragControllerQt.cpp:
3277         (WebCore::DragController::dragOperation):
3278
3279 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
3280
3281         Reviewed by David Levin.
3282
3283         Update deprecated include: platform_canvas_win.h to platform_canvas.h.
3284         https://bugs.webkit.org/show_bug.cgi?id=57896
3285
3286         * platform/graphics/chromium/FontChromiumWin.cpp:
3287
3288 2011-04-05  Darin Adler  <darin@apple.com>
3289
3290         Try to fix Leopard bots.
3291
3292         * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
3293         to have intended it.
3294
3295 2011-04-05  Darin Adler  <darin@apple.com>
3296
3297         Try to fix Leopard bots.
3298
3299         * platform/mac/HTMLConverter.mm: Move declarations of new functions
3300         inside the appropriate #if.
3301
3302 2011-04-05  Adrienne Walker  <enne@google.com>
3303
3304         Reviewed by Tony Chang.
3305
3306         Correctly set color when using skia's fillRoundedRect.
3307         https://bugs.webkit.org/show_bug.cgi?id=57907
3308
3309         * platform/graphics/skia/GraphicsContextSkia.cpp:
3310         (WebCore::GraphicsContext::fillRoundedRect):
3311
3312 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
3313
3314         Reviewed by Darin Adler.
3315
3316         Move attributedStringFromRange down to WebCore
3317         https://bugs.webkit.org/show_bug.cgi?id=57905
3318
3319         No change in behavior, so no new tests.
3320
3321         Also tweaked HTMLConverter to not use methods defined in WebKit.
3322
3323         * WebCore.exp.in:
3324         * WebCore.xcodeproj/project.pbxproj:
3325         * platform/mac/HTMLConverter.h:
3326         * platform/mac/HTMLConverter.mm:
3327         (-[WebHTMLConverter _newTabForElement:]):
3328         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3329         (+[WebHTMLConverter editingAttributedStringFromRange:]):
3330         (fileWrapperForURL):
3331         (fileWrapperForElement):
3332         * platform/mac/PasteboardMac.mm:
3333         (WebCore::Pasteboard::writeSelection):
3334         * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
3335         * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
3336         (WebCore::attributedStringByStrippingAttachmentCharacters):
3337
3338 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
3339
3340         Reviewed by Darin Adler.
3341
3342         Rename variables in border drawing code for readability
3343         https://bugs.webkit.org/show_bug.cgi?id=57894
3344
3345         * rendering/RenderObject.cpp:
3346         (WebCore::RenderObject::drawLineForBoxSide):
3347         (WebCore::RenderObject::drawBoxSideFromPath):
3348         (WebCore::RenderObject::drawArcForBoxSide):
3349
3350 2011-04-05  Antti Koivisto  <antti@apple.com>
3351
3352         Reviewed by Darin Adler.
3353
3354         Defer repaints during style recalc
3355         https://bugs.webkit.org/show_bug.cgi?id=57886
3356
3357         This reduces the need to do (often expensive) platform surface invalidation.
3358         We already do this during layout but style recalculation may trigger
3359         invalidation as well.
3360     
3361         * dom/Document.cpp:
3362         (WebCore::Document::recalcStyle):
3363
3364 2011-04-05  Jer Noble  <jer.noble@apple.com>
3365
3366         Reviewed by Darin Adler.
3367
3368         HTML5 Player Has no Fullscreen Mode
3369         https://bugs.webkit.org/show_bug.cgi?id=57795
3370
3371         * html/HTMLVideoElement.cpp:
3372         (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
3373             supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
3374
3375 2011-04-05  Vsevolod Vlasov  <vsevik@chromium.org>
3376
3377         Reviewed by Pavel Feldman.
3378
3379         Web Inspector: fix data url's status and timing the network panel.
3380         https://bugs.webkit.org/show_bug.cgi?id=53066
3381
3382         Added data url support for status of network resources.
3383
3384         * English.lproj/localizedStrings.js:
3385         * inspector/front-end/NetworkPanel.js:
3386         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
3387         * inspector/front-end/Resource.js:
3388         (WebInspector.Resource.prototype.isDataURL):
3389
3390 2011-04-04  Vitaly Repeshko  <vitalyr@chromium.org>
3391
3392         Reviewed by Adam Barth.
3393
3394         [V8] Keep dirty primitive CSS values alive.
3395         https://bugs.webkit.org/show_bug.cgi?id=57810
3396
3397         * bindings/v8/V8GCController.cpp:
3398         (WebCore::GrouperVisitor::visitDOMWrapper):
3399
3400 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
3401
3402         Reviewed by Adele Peterson.
3403
3404         Add a fast path for simple color backgrounds
3405         https://bugs.webkit.org/show_bug.cgi?id=57773
3406
3407         Add a fast path for drawing simple color backgrounds. It's
3408         faster to fill a path or rect than it is to set up a clip,
3409         and then paint the rect.
3410         
3411         No visible behavior change so no new tests.
3412
3413         * rendering/RenderBoxModelObject.cpp:
3414         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3415
3416 2011-04-05  Patrick Gansterer  <paroga@webkit.org>
3417
3418         Unreviewed EFL build fix for r82962.
3419
3420         * CMakeListsEfl.txt:
3421
3422 2011-04-05  Chris Rogers  <crogers@google.com>
3423
3424         Reviewed by Kenneth Russell.
3425
3426         Add support for offline audio rendering to AudioContext API
3427         https://bugs.webkit.org/show_bug.cgi?id=57676
3428
3429         No new tests since audio API is not yet implemented.
3430
3431         * DerivedSources.make:
3432         * WebCore.gypi:
3433         * WebCore.xcodeproj/project.pbxproj:
3434         * bindings/js/JSAudioContextCustom.cpp:
3435         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3436         * bindings/js/JSEventCustom.cpp:
3437         (WebCore::toJS):
3438         * bindings/js/JSEventTarget.cpp:
3439         (WebCore::toJS):
3440         * bindings/v8/V8DOMWrapper.cpp:
3441         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
3442         * bindings/v8/custom/V8AudioContextCustom.cpp:
3443         (WebCore::V8AudioContext::constructorCallback):
3444         * bindings/v8/custom/V8EventCustom.cpp:
3445         (WebCore::toV8):
3446         * dom/Event.cpp:
3447         (WebCore::Event::isOfflineAudioCompletionEvent):
3448         * dom/Event.h:
3449         * dom/EventTarget.cpp:
3450         (WebCore::EventTarget::toAudioContext):
3451         * dom/EventTarget.h:
3452         * platform/audio/HRTFDatabaseLoader.cpp:
3453         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
3454         * platform/audio/HRTFDatabaseLoader.h:
3455         (WebCore::HRTFDatabaseLoader::loader):
3456         * webaudio/AudioContext.cpp:
3457         (WebCore::AudioContext::createOfflineContext):
3458         (WebCore::AudioContext::AudioContext):
3459         (WebCore::AudioContext::constructCommon):
3460         (WebCore::AudioContext::document):
3461         (WebCore::AudioContext::scriptExecutionContext):
3462         (WebCore::AudioContext::toAudioContext):
3463         (WebCore::AudioContext::startRendering):
3464         (WebCore::AudioContext::fireCompletionEvent):
3465         * webaudio/AudioContext.h:
3466         (WebCore::AudioContext::isOfflineContext):
3467         (WebCore::AudioContext::eventTargetData):
3468         (WebCore::AudioContext::ensureEventTargetData):
3469         (WebCore::AudioContext::refEventTarget):
3470         (WebCore::AudioContext::derefEventTarget):
3471         * webaudio/AudioContext.idl:
3472         * webaudio/AudioDestinationNode.cpp:
3473         (WebCore::AudioDestinationNode::AudioDestinationNode):
3474         * webaudio/AudioDestinationNode.h:
3475         (WebCore::AudioDestinationNode::reset):
3476         (WebCore::AudioDestinationNode::numberOfChannels):
3477         * webaudio/ConvolverNode.cpp:
3478         (WebCore::ConvolverNode::setBuffer):
3479         * webaudio/DefaultAudioDestinationNode.cpp: Added.
3480         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
3481         (WebCore::DefaultAudioDestinationNode::~DefaultAudioDestinationNode):
3482         (WebCore::DefaultAudioDestinationNode::initialize):
3483         (WebCore::Defaul