2011-04-06 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Reviewed by Yury Semikhatsky.
4
5         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
6         https://bugs.webkit.org/show_bug.cgi?id=57957
7
8         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
9         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
10         It was decided that we will use it.
11
12         the list of renames:
13         1) type-> /dev/null
14         2) domain + '.' + event => method // for events
15         3) domain + '.' + command => method // for requests
16         4) requestId => id // for responses
17         5) arguments => params // for requests
18         6) data => params // for events
19         7) body => result // for responses
20
21         protocolErrors and error properties will be converted to JSON-RPC error format.
22         The order of properties in messages also will be adjusted.
23         The only thing that looks unnecessary is jsonrpc property.
24
25         * inspector/CodeGeneratorInspector.pm:
26
27 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
28
29         Reviewed by Eric Seidel.
30
31         Add functions to update left and right offsets to LineOffsets
32         https://bugs.webkit.org/show_bug.cgi?id=58028
33
34         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
35         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
36         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
37
38         * rendering/RenderBlock.h:
39         * rendering/RenderBlockLineLayout.cpp:
40         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
41         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
42         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
43         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
44         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
45         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
46         no longer passes firstLine around.
47
48 2011-04-06  Pavel Feldman  <pfeldman@google.com>
49
50         Reviewed by Yury Semikhatsky.
51
52         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
53         https://bugs.webkit.org/show_bug.cgi?id=57928
54
55         * inspector/Inspector.json:
56         * inspector/InspectorDebuggerAgent.cpp:
57         (WebCore::buildObjectForBreakpointCookie):
58         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
59         (WebCore::InspectorDebuggerAgent::setBreakpoint):
60         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
61         (WebCore::InspectorDebuggerAgent::didParseSource):
62         * inspector/InspectorDebuggerAgent.h:
63         * inspector/front-end/Breakpoint.js:
64         (WebInspector.Breakpoint):
65         * inspector/front-end/DebuggerModel.js:
66         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
67         (WebInspector.DebuggerModel.prototype._breakpointResolved):
68
69 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
70
71         Reviewed by Benjamin Poulain.
72
73         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
74
75         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
76         hint may get set depending on how that widget is laid out in its parent.
77         If this happens when drawing a vertical scrollbar, the hint is never
78         cleared and we end up painting a vertical scrollbar with horizontal arrows.
79
80         Covered by pixel tests which should no longer paint silly scrollbars.
81
82         * platform/qt/ScrollbarThemeQt.cpp:
83         (WebCore::styleOptionSlider):
84
85 2011-04-07  Adam Barth  <abarth@webkit.org>
86
87         Reviewed by Eric Seidel.
88
89         script-src should block inline script
90         https://bugs.webkit.org/show_bug.cgi?id=58012
91
92         Block inline scripts at the ScriptElement layer.  This should catch
93         exactly the scripts we want to catch.
94
95         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
96
97         * dom/Document.cpp:
98         (WebCore::Document::processHttpEquiv):
99             - This patch also adds the ability to supply a CSP policy via a
100               <meta> tag.  We'll update the name of the header once we've
101               finished implementing the spec.
102         * dom/ScriptElement.cpp:
103         (WebCore::ScriptElement::executeScript):
104         * page/ContentSecurityPolicy.cpp:
105         (WebCore::ContentSecurityPolicy::allowInlineScript):
106         * page/ContentSecurityPolicy.h:
107
108 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
109
110         Reviewed by Ryosuke Niwa.
111
112         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
113         https://bugs.webkit.org/show_bug.cgi?id=57921
114
115         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
116         that the same logic can be used for a HitTestResult.
117
118         No visible changes, just cleanup, so no tests.
119
120         * page/EventHandler.cpp:
121         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
122         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
123         (WebCore::EventHandler::handleMousePressEventTripleClick):
124         (WebCore::EventHandler::handleMousePressEventSingleClick):
125         (WebCore::EventHandler::handleMousePressEvent):
126         (WebCore::EventHandler::handleMouseDraggedEvent):
127         (WebCore::EventHandler::handleMouseReleaseEvent):
128         (WebCore::EventHandler::subframeForHitTestResult):
129         Made public static member, so that it can access targetNode(), and be accessed by
130         webkitwebview in gtk.
131         (WebCore::EventHandler::selectCursor):
132         (WebCore::EventHandler::targetNode):
133         (WebCore::EventHandler::handleMouseDoubleClickEvent):
134         (WebCore::EventHandler::handleMouseMoveEvent):
135         (WebCore::EventHandler::updateDragAndDrop):
136         (WebCore::EventHandler::sendContextMenuEvent):
137         * page/EventHandler.h:
138         * page/MouseEventWithHitTestResults.cpp:
139         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
140         * page/MouseEventWithHitTestResults.h:
141         * page/android/EventHandlerAndroid.cpp:
142         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
143         * page/brew/EventHandlerBrew.cpp:
144         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
145         * page/chromium/EventHandlerChromium.cpp:
146         (WebCore::EventHandler::passMousePressEventToSubframe):
147         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
148         * page/efl/EventHandlerEfl.cpp:
149         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
150         * page/gtk/EventHandlerGtk.cpp:
151         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
152         * page/haiku/EventHandlerHaiku.cpp:
153         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
154         * page/mac/EventHandlerMac.mm:
155         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
156         (WebCore::EventHandler::passSubframeEventToSubframe):
157         * page/wx/EventHandlerWx.cpp:
158         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
159
160 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
161
162         Reviewed by Pavel Feldman.
163
164         Web Inspector: build mapping for formatted scripts based on keywords positions.
165         https://bugs.webkit.org/show_bug.cgi?id=57936
166
167         Mapping based on [\$\.\w]+ was not accurate because string literals representation
168         may be different in original and formatted scripts.
169
170         * inspector/front-end/ScriptFormatterWorker.js:
171         (buildMapping.regexp.b):
172         (buildMapping):
173
174 2011-04-07  Kent Tamura  <tkent@chromium.org>
175
176         Reviewed by Dimitri Glazkov.
177
178         Spinbuttons become unclickable if right padding is large.
179         https://bugs.webkit.org/show_bug.cgi?id=56298
180
181         An inner-spin-button is put on the right border and ignores right
182         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
183         checks if a point is in an area just right of an internal text block.
184         This inconsistency caused a bug that an inner-spin-button with large
185         padding didn't receive mouse events.
186
187         To fix this bug, we render spin buttons as layers, and remove manual
188         event forwarding code.
189
190         Test: fast/forms/input-number-large-padding.html
191
192         * css/html.css: Add "position:relative" to make a spin-button a layer.
193         (input::-webkit-inner-spin-button):
194         (input::-webkit-outer-spin-button):
195         * rendering/RenderTextControlSingleLine.cpp:
196         (WebCore::RenderTextControlSingleLine::forwardEvent):
197           Remove manual event forwarding code.
198
199 2011-04-06  Adam Barth  <abarth@webkit.org>
200
201         Reviewed by Eric Seidel.
202
203         CSP object-src should block plugin loads
204         https://bugs.webkit.org/show_bug.cgi?id=57283
205
206         This change is pretty straight-forward.  It's slighly unclear to me
207         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
208         added a FIXME comment, and I'll investigate that case more in the future.
209
210         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
211
212         * loader/DocumentWriter.cpp:
213         (WebCore::DocumentWriter::begin):
214         * loader/SubframeLoader.cpp:
215         (WebCore::SubframeLoader::requestPlugin):
216         * page/ContentSecurityPolicy.cpp:
217         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
218         (WebCore::ContentSecurityPolicy::addDirective):
219         * page/ContentSecurityPolicy.h:
220
221 2011-04-06  Beth Dakin  <bdakin@apple.com>
222
223         Reviewed by Dan Bernstein.
224
225         https://bugs.webkit.org/show_bug.cgi?id=58009
226         Frame::scalePage() results in visual artifacts with scale factors less than 1
227         -and corresponding-
228         <rdar://problem/8683230>
229
230         Fall into the case where we fill with a background base color when there is a page 
231         scale factor that is less than 1.
232         * rendering/RenderView.cpp:
233         (WebCore::RenderView::paintBoxDecorations):
234
235 2011-04-06  Jer Noble  <jer.noble@apple.com>
236
237         Reviewed by Darin Adler.
238
239         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
240         https://bugs.webkit.org/show_bug.cgi?id=57982
241
242         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
243
244         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
245         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
246
247 2011-04-06  Jer Noble  <jer.noble@apple.com>
248
249         Reviewed by Eric Carlson.
250
251         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
252         https://bugs.webkit.org/show_bug.cgi?id=57919
253
254         Test: media/video-set-rate-from-pause.html
255
256         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
257         of the media; instead a subclass must do that work.  So when setRate() is called, 
258         inform a subclass through a new pure virtual updateRate() function that there's 
259         work to be done.
260
261         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
262         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
263         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
264         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
265         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
266         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
267
268 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
269
270         Reviewed by David Levin.
271
272         Add QUOTA build flag for unified quota API
273         https://bugs.webkit.org/show_bug.cgi?id=57918
274
275         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
276         * GNUmakefile.am: Added QUOTA build flag
277         * WebCore.pri: Added QUOTA build flag
278
279 2011-04-06  Stephanie Lewis  <slewis@apple.com>
280
281         Reviewed by Darin Adler.
282
283         https://bugs.webkit.org/show_bug.cgi?id=57997
284         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
285         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
286         Cancel all enqueued events when detaching the Document the events cannot keep the Document
287         alive.
288
289         No change in functionality so no new tests.  
290
291         * dom/Document.cpp:
292         (WebCore::Document::detach):
293         * dom/EventQueue.cpp:
294         (WebCore::EventQueue::cancelQueuedEvents):
295         * dom/EventQueue.h:
296
297 2011-04-06  Dan Bernstein  <mitz@apple.com>
298
299         Reviewed by Darin Adler.
300
301         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
302         https://bugs.webkit.org/show_bug.cgi?id=58002
303
304         * platform/graphics/mac/SimpleFontDataMac.mm:
305         (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
306         does not require the vertical metrics tweaks that were needed in Leopard. That the
307         tweaks were being applied went mostly unnoticed until r73993, because until then it
308         only affected cases where Geeza Pro was specified, not when it occurred as a fallback
309         font.
310
311 2011-04-06  Roland Steiner  <rolandsteiner@chromium.org>
312
313         Reviewed by Dimitri Glazkov.
314
315         Bug 57994 - Move guardRef functionality back to Document
316         https://bugs.webkit.org/show_bug.cgi?id=57994
317
318         Move the relevant code parts from TreeScope back into Document.
319
320         No new tests. (no new functionality)
321
322         * dom/Document.cpp:
323         (WebCore::Document::removedLastRef):
324         * dom/Document.h:
325         * dom/TreeScope.cpp:
326         (WebCore::TreeScope::destroyTreeScopeData):
327         * dom/TreeScope.h:
328
329 2011-04-06  Ian Henderson  <ianh@apple.com>
330
331         Reviewed by Simon Fraser, Antti Koivisto.
332
333         Fast path for parsing simple CSS values
334         https://bugs.webkit.org/show_bug.cgi?id=57964
335
336         Add functions to parse simple color or dimension values, skipping the
337         overhead of full CSS parsing.
338
339         Change parseValue to a static method to avoid unnecessary allocation
340         of a CSSParser in the fast case.
341
342         * css/CSSMutableStyleDeclaration.cpp:
343         (WebCore::CSSMutableStyleDeclaration::setProperty):
344         Changed to use the new, static parseValue method.
345         * css/CSSParser.cpp:
346         (WebCore::isColorPropertyID):
347         (WebCore::parseColorValue):
348         Parses any color accepted by the existing parseColor() static method.
349         We must handle color identifiers separately, since parseColor() will
350         change 'red' into 'rgb(255, 0, 0)'.
351         (WebCore::isSimpleLengthPropertyID):
352         (WebCore::parseSimpleLengthValue):
353         Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
354         false, or 'NN' is '0').  Returns false to fall back to the slow path.
355         (WebCore::CSSParser::parseValue):
356         * css/CSSParser.h:
357         * css/WebKitCSSMatrix.cpp:
358         (WebCore::WebKitCSSMatrix::setMatrixValue):
359         Changed to use the new, static parseValue method.
360
361 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
362
363         Reviewed by Darin Adler.
364
365         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
366
367         https://bugs.webkit.org/show_bug.cgi?id=27551
368
369         * config.h:
370
371 2011-04-06  Simon Fraser  <simon.fraser@apple.com>
372
373         Reviewed by Antti Koivisto.
374
375         Some minor style resolution optimizations
376         https://bugs.webkit.org/show_bug.cgi?id=57996
377
378         A couple of minor optimizations to style-related code.
379
380         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
381         (WebCore::isCSSPropertyName):
382         (WebCore::JSCSSStyleDeclaration::putDelegate):
383         Avoid calling cssPropertyName() twice when setting style on an element.
384         
385         * css/CSSStyleSelector.cpp:
386         (WebCore::useSVGZoomRules):
387         (WebCore::CSSStyleSelector::applyProperty):
388         Avoid calling isSVGElement() for every property, since only a two properties
389         care about it.
390
391 2011-04-06  Ian Henderson  <ianh@apple.com>
392
393         Reviewed by Antti Koivisto.
394
395         Unnecessary string allocation in CSSStyleDeclaration::setProperty
396         https://bugs.webkit.org/show_bug.cgi?id=57995
397
398         Pass the bool representing the property's importance directly instead
399         of constructing a string.
400
401         * css/CSSStyleDeclaration.cpp:
402         (WebCore::CSSStyleDeclaration::setProperty):
403
404 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
405
406         Reviewed by Steve Block.
407
408         Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
409         https://bugs.webkit.org/show_bug.cgi?id=57963
410
411         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
412
413         * bindings/v8/V8Utilities.h:
414         (WebCore::createFunctionOnlyCallback):
415         * bindings/v8/custom/V8GeolocationCustom.cpp:
416         (WebCore::V8Geolocation::getCurrentPositionCallback):
417         (WebCore::V8Geolocation::watchPositionCallback):
418
419 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
420
421         Reviewed by Adam Roben.
422
423         WebKit2: Support Windows 7 Gestures
424         https://bugs.webkit.org/show_bug.cgi?id=49824
425         <rdar://problem/8689728>
426         
427         Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
428
429         * WebCore.vcproj/WebCore.vcproj:
430         * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
431
432 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
433
434         Reviewed by Andreas Kling.
435
436         [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
437         https://bugs.webkit.org/show_bug.cgi?id=57974
438
439         We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
440
441         No new tests needed, just a config flag rename.
442
443         * features.pri:
444
445 2011-04-06  Tyler Close  <tjclose@chromium.org>
446
447         Reviewed by Nate Chapin.
448
449         run-bindings-tests reference files out of sync with CodeGenerator*.pm
450         https://bugs.webkit.org/show_bug.cgi?id=57967
451
452         * bindings/scripts/test/V8/V8TestCallback.cpp:
453
454 2011-04-06  Asanka Herath  <asanka@chromium.org>
455
456         Reviewed by Darin Fisher.
457
458         Add new TargetType: TargetIsFavicon
459
460         https://bugs.webkit.org/show_bug.cgi?id=57659
461
462         No new functionality added, so no additional tests.
463
464         * platform/network/ResourceRequestBase.h:
465
466 2011-04-06  David Hyatt  <hyatt@apple.com>
467
468         Reviewed by Simon Fraser.
469
470         https://bugs.webkit.org/show_bug.cgi?id=57981
471         
472         Update the column count and width computation algorithm for CSS3 multi-column layout 
473         to match the revised pseudo-algorithm in the latest draft of the spec.
474
475         * rendering/RenderBlock.cpp:
476         (WebCore::RenderBlock::calcColumnWidth):
477
478 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
479
480         Reviewed by Eric Seidel.
481
482         borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
483         https://bugs.webkit.org/show_bug.cgi?id=57965
484
485         Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
486         from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
487         instead of marginStartForChild and marginEndForChild respectively.
488
489         Calling these two functions on RenderInline is okay because writing-mode cannot differ
490         from that of the containing block.
491
492         * rendering/RenderBlockLineLayout.cpp:
493         (WebCore::borderPaddingMarginStart):
494         (WebCore::borderPaddingMarginEnd):
495         (WebCore::inlineLogicalWidth):
496
497 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
498
499         Unreviewed, rolling out r83039.
500         http://trac.webkit.org/changeset/83039
501         https://bugs.webkit.org/show_bug.cgi?id=57978
502
503         introduced a new regression in conjunction to
504         ReplaceSelectionCommand (Requested by rniwa on #webkit).
505
506         * editing/EditingStyle.cpp:
507         (WebCore::EditingStyle::init):
508         * editing/InsertParagraphSeparatorCommand.cpp:
509         (WebCore::InsertParagraphSeparatorCommand::doApply):
510
511 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
512
513         Reviewed by David Levin.
514
515         Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
516         https://bugs.webkit.org/show_bug.cgi?id=27658
517
518         Test: fast/events/select-element.html
519
520         * dom/SelectElement.cpp:
521         (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
522         (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
523         (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
524         And converted to a normal static function from a private function of SelectElement.
525         (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
526         And converted to a normal static function from a private function of SelectElement.
527         (WebCore::firstSelectableListIndex): Returns the first selectable index.
528         (WebCore::lastSelectableListIndex): Returns the last selectable index.
529         (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
530         (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
531
532         * dom/SelectElement.h:
533         (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
534
535         * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
536         They can differ due to the minimum size imposed by RenderListBox.
537
538 2011-04-06  David Hyatt  <hyatt@apple.com>
539
540         Reviewed by Dan Bernstein.
541
542         https://bugs.webkit.org/show_bug.cgi?id=57975
543
544         The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
545         to just look at the style, so that it can find the InlineTextBox and not care that it's a child
546         of the link element and not the line box for the link element itself (since that line box got
547         culled).
548
549         * rendering/RenderFlexibleBox.cpp:
550         (WebCore::RenderFlexibleBox::applyLineClamp):
551
552 2011-04-06  Brady Eidson  <beidson@apple.com>
553
554         Reviewed by Anders Carlsson.
555
556         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
557         WK2 icon database should be able to get a CGImage of a specific size
558
559         * platform/graphics/BitmapImage.h:
560         * platform/graphics/Image.h:
561         (WebCore::Image::getFirstCGImageRefOfSize):
562         
563         * platform/graphics/cg/ImageCG.cpp:
564         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
565           first frame of the requested size.
566
567 2011-04-06  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
568
569         Reviewed by Kevin Ollivier.
570
571         [wx] Fix cursor handling so that we always call the chrome to set it.
572         
573         https://bugs.webkit.org/show_bug.cgi?id=57972
574
575         * platform/wx/WidgetWx.cpp:
576         (WebCore::Widget::setCursor):
577
578 2011-04-06  David Hyatt  <hyatt@apple.com>
579
580         Reviewed by Dan Bernstein.
581
582         https://bugs.webkit.org/show_bug.cgi?id=41445
583         
584         Visited links painting with black background. Make sure that if the visited style has
585         the initial background color (transparent) set that we just use the unvisited color.
586
587         Added fast/history/visited-link-background-color.html
588
589         * rendering/style/RenderStyle.cpp:
590         (WebCore::RenderStyle::visitedDependentColor):
591
592 2011-04-06  Csaba Osztrogonác  <ossy@webkit.org>
593
594         Unreviewed Qt buildfix after r83079.
595
596         * WebCore.pro:
597
598 2011-04-06  Dean Jackson  <dino@apple.com>
599
600         Reviewed by Chris Marrin.
601
602         https://bugs.webkit.org/show_bug.cgi?id=56936
603         Crash in ImplicitAnimation::~ImplicitAnimation
604
605         Make sure the style and start time waiting lists
606         are cleared in the CompositeAnimation destructor. This
607         way, no running transitions can be left in a state
608         where they are destroyed as the AnimationControllerPrivate
609         cleans up.
610
611         * page/animation/CompositeAnimation.cpp:
612         (WebCore::CompositeAnimation::~CompositeAnimation):
613
614 2011-04-06  Robert Sesek  <rsesek@chromium.org>
615
616         Reviewed by Alexey Proskuryakov.
617
618         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
619         https://bugs.webkit.org/show_bug.cgi?id=54969
620
621         No change in behavior; no new tests.
622
623         * editing/TextIterator.cpp:
624         (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
625         * editing/TextIterator.h:
626         * page/Frame.cpp:
627         (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
628
629 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
630
631         Reviewed by Steve Block.
632
633         Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
634         https://bugs.webkit.org/show_bug.cgi?id=57770
635
636         Create a template from an existing functionality in JSGeolocationCustom.cpp
637         to be used by the custom bindings of both Geolocation and the Media Stream API.
638         V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
639
640         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
641
642         * Android.jscbindings.mk:
643         * CMakeLists.txt:
644         * GNUmakefile.am:
645         * WebCore.gypi:
646         * WebCore.pro:
647         * WebCore.vcproj/WebCore.vcproj:
648         * WebCore.xcodeproj/project.pbxproj:
649         * bindings/js/CallbackFunction.cpp: Added.
650         (WebCore::checkFunctionOnlyCallback):
651         * bindings/js/CallbackFunction.h: Added.
652         (WebCore::createFunctionOnlyCallback):
653         * bindings/js/JSBindingsAllInOne.cpp:
654         * bindings/js/JSGeolocationCustom.cpp:
655         (WebCore::JSGeolocation::getCurrentPosition):
656         (WebCore::JSGeolocation::watchPosition):
657
658 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
659
660         Reviewed by Andreas Kling.
661
662         [Qt] Implement fullscreen playback for the GStreamer backend.
663         https://bugs.webkit.org/show_bug.cgi?id=56826
664
665         Implement support for fullscreen playback when building the
666         Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
667         The implementation is done in FullScreenVideoQt alongside with
668         the Qt Multimedia support.
669
670         No new tests because layout tests cover it. They are not yet activated
671         but will be any time soon.
672
673         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
674         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
675         (FullScreenVideoWindow::FullScreenVideoWindow):
676         (FullScreenVideoWindow::setVideoElement):
677         (FullScreenVideoWindow::closeEvent):
678         (FullScreenVideoWindow::keyPressEvent):
679         (FullScreenVideoWindow::event):
680         (FullScreenVideoWindow::showFullScreen):
681         (FullScreenVideoWindow::hideCursor):
682         (FullScreenVideoWindow::showCursor):
683
684 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
685
686         Reviewed by Dimitri Glazkov.
687
688         Bundle lineLeftOffset and lineRightOffset as a class
689         https://bugs.webkit.org/show_bug.cgi?id=57851
690
691         Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
692         The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
693         and only the difference is used to compute the width.
694
695         * rendering/RenderBlock.h:
696         * rendering/RenderBlockLineLayout.cpp:
697         (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
698         (WebCore::LineOffsets::LineOffsets): Added.
699         (WebCore::LineOffsets::width): Added.
700         (WebCore::LineOffsets::setLeft): Added.
701         (WebCore::LineOffsets::setRight): Added.
702         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
703         (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
704
705 2011-04-06  David Hyatt  <hyatt@apple.com>
706
707         Reviewed by Dan Bernstein.
708
709         https://bugs.webkit.org/show_bug.cgi?id=57916
710         
711         Implement an optimization to the line box tree to cull out most of the intermediate
712         line boxes that can occur between the root line box and the leaves of the tree (images
713         and text).
714
715         RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
716         that starts off as false. Only if it gets flipped to true will there be any line boxes
717         created for that RenderInline.
718         
719         * page/FocusController.cpp:
720         (WebCore::FocusController::advanceFocusDirectionally):
721         Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
722         is up to date.
723
724         * page/SpatialNavigation.cpp:
725         (WebCore::hasOffscreenRect):
726         (WebCore::nodeRectInAbsoluteCoordinates):
727         Add asserts in spatial navigation code to catch any future bad queries that might be made
728         for rectangles without layout being up to date.
729
730         * platform/graphics/FloatRect.cpp:
731         (WebCore::FloatRect::uniteIfNonZero):
732         * platform/graphics/FloatRect.h:
733         * platform/graphics/IntRect.cpp:
734         (WebCore::IntRect::uniteIfNonZero):
735         * platform/graphics/IntRect.h:
736         Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
737         version allows rect unites to happen if either width or height is nonzero.
738
739         * rendering/HitTestResult.cpp:
740         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
741         Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
742         if content inside those inlines is hit.
743
744         * rendering/InlineBox.h:
745         (WebCore::InlineBox::logicalFrameRect):
746         Fix a bug in this function for obtaining the logical frame rect of an inline box.
747
748         * rendering/InlineFlowBox.cpp:
749         (WebCore::InlineFlowBox::addToLine):
750         addToLine now also checks line gap in the line box tree optimization checks.
751     
752         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
753         (WebCore::InlineFlowBox::computeOverflow):
754         * rendering/InlineFlowBox.h:
755         Rewritten to add the text box overflow to the text box itself.
756
757          * rendering/InlineTextBox.cpp:
758         (WebCore::InlineTextBox::destroy):
759         Destroy has been changed to call a helper function to remove and destroy the line boxes that
760         is now called from one additional spot.
761
762         (WebCore::InlineTextBox::logicalOverflowRect):
763         (WebCore::InlineTextBox::setLogicalOverflowRect):
764         Text boxes now cache their own overflow in a global hash table.
765
766         (WebCore::InlineTextBox::baselinePosition):
767         (WebCore::InlineTextBox::lineHeight):
768         Changed to not assume that the parent line box's renderer is the RenderText's immediate
769         parent, since intermediate line boxes may have been culled.
770
771         (WebCore::InlineTextBox::paint):
772         Paint now properly checks only the text box overflow instead of the parent line box's overflow.
773
774         * rendering/InlineTextBox.h:
775         (WebCore::InlineTextBox::logicalTopVisualOverflow):
776         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
777         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
778         (WebCore::InlineTextBox::logicalRightVisualOverflow):
779         New accessors to obtain overflow for inline text boxes.
780
781         * rendering/RenderBlock.cpp:
782         (WebCore::RenderBlock::updateFirstLetter):
783         updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
784         text boxes may not have anything in between them and the block that contains the inline first letter
785         container.
786
787         * rendering/RenderBlockLineLayout.cpp:
788         (WebCore::RenderBlock::createLineBoxes):
789         The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
790         be created.
791
792         (WebCore::RenderBlock::layoutInlineChildren):
793         The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
794         This is done before any lines are built.
795
796         * rendering/RenderInline.cpp:
797         (WebCore::RenderInline::RenderInline):
798         The new m_alwaysCreateLineBoxes flag has been added to the constructor.
799
800         (WebCore::RenderInline::styleDidChange):
801         An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
802         (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
803         the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
804
805         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
806         The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
807         vertical alignment, line height, etc.).
808
809         (WebCore::RenderInline::absoluteRects):
810         (WebCore::RenderInline::culledInlineAbsoluteRects):
811         absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
812
813         (WebCore::RenderInline::absoluteQuads):
814         (WebCore::RenderInline::culledInlineAbsoluteQuads):
815         absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
816
817         (WebCore::RenderInline::offsetLeft):
818         (WebCore::RenderInline::offsetTop):
819         offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
820
821         (WebCore::RenderInline::linesBoundingBox):
822         (WebCore::RenderInline::culledInlineBoundingBox):
823         lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
824
825         (WebCore::RenderInline::culledInlineFirstLineBox):
826         (WebCore::RenderInline::culledInlineLastLineBox):
827         Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
828         lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
829
830         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
831         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
832         linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
833
834         (WebCore::RenderInline::clippedOverflowRectForRepaint):
835         The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
836
837         (WebCore::RenderInline::dirtyLineBoxes):
838         dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
839         m_alwaysCreateLineBoxes is false.
840
841         (WebCore::RenderInline::createAndAppendInlineFlowBox):
842         Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
843         when line-box-contain is set to an unusual value.
844
845         (WebCore::RenderInline::addFocusRingRects):
846         Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
847
848         * rendering/RenderInline.h:
849         (WebCore::RenderInline::firstLineBoxIncludingCulling):
850         (WebCore::RenderInline::lastLineBoxIncludingCulling):
851         Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
852         is all that needs checking.
853
854         (WebCore::RenderInline::alwaysCreateLineBoxes):
855         (WebCore::RenderInline::setAlwaysCreateLineBoxes):
856         Functions for getting and setting the m_alwaysCreateLineBoxes flag.
857
858         * rendering/RenderLineBoxList.cpp:
859         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
860         Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
861         lines get dirtied.
862
863         * rendering/RenderText.cpp:
864         (WebCore::RenderText::removeAndDestroyTextBoxes):
865         New helper invoked by destroy and also from updateFirstLetter.
866
867         (WebCore::RenderText::destroy):
868         Changed to call removeAndDestroyTextBoxes.
869
870         (WebCore::RenderText::absoluteRects):
871         Fixed to be properly physical instead of logical.
872
873         (WebCore::RenderText::linesVisualOverflowBoundingBox):
874         New implementation for RenderText that gives the bounding box of the text boxes including overflow from
875         shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.
876
877         * rendering/RenderText.h:
878         * rendering/svg/RenderSVGInline.cpp:
879         (WebCore::RenderSVGInline::RenderSVGInline):
880         RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
881
882         * rendering/svg/SVGRootInlineBox.cpp:
883         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
884         (WebCore::SVGRootInlineBox::layoutChildBoxes):
885         Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
886         now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
887
888 2011-04-05  Enrica Casucci  <enrica@apple.com>
889
890         Reviewed by Darin Adler.
891
892         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
893         https://bugs.webkit.org/show_bug.cgi?id=57909
894         <rdar://problem/9103220>
895
896         In WebKit2 we cannot rely on the value returned by platformData() that
897         on Mac returns an NSDraggingInfo object. This is available only in the UI
898         process. Therefore we should use m_pasteboard instead.
899         We cannot change what platformData() returns on Mac, since there are
900         delegate methods that receive a NSDraggingInfo object (only in WebKit).
901         
902         * platform/DragData.h:
903         (WebCore::DragData::pasteboard): Added.
904         * platform/mac/ClipboardMac.mm:
905         (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
906         * platform/mac/DragDataMac.mm:
907         (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
908         (WebCore::DragData::asURL): Same as above.
909
910 2011-04-06  Benjamin Poulain  <benjamin.poulain@nokia.com>
911
912         Reviewed by Darin Adler.
913
914         ClipboardWin has unused variables "ExceptionCode ec"
915         https://bugs.webkit.org/show_bug.cgi?id=57952
916
917         Remove the unused variable.
918
919         * platform/win/ClipboardWin.cpp:
920         (WebCore::ClipboardWin::declareAndWriteDragImage):
921         (WebCore::ClipboardWin::writePlainText):
922
923 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
924
925         Reviewed by Dimitri Glazkov.
926
927         Split getBorderPaddingMargin into two functions
928         https://bugs.webkit.org/show_bug.cgi?id=57947
929
930         * rendering/RenderBlockLineLayout.cpp:
931         (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
932         (WebCore::borderPaddingMarginEnd): Ditto.
933         (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
934         (WebCore::RenderBlock::findNextLineBreak): Ditto.
935
936 2011-04-06  MORITA Hajime  <morrita@google.com>
937
938         Reviewed by Dimitri Glazkov.
939
940         [Refactoring] <progress> should not have manual layout code.
941         https://bugs.webkit.org/show_bug.cgi?id=57801
942
943         - Simplified RenderProgress, removing its custom layout code
944         - Introducing ProgressValueElement and ProgressBarElement, replacing
945           ProgressBarValueElement. 
946         
947         Now the structure is almost identical to <meter>, 
948         other than:
949         - RenderProgress has animated painting, thus manages its own timer.
950         - Both ProgressValueElement and ProgressBarElement has pseudo classes
951           which don't changes during its lifetime.
952        
953         * Android.mk:
954         * CMakeLists.txt:
955         * GNUmakefile.am:
956         * WebCore.gypi:
957         * WebCore.pro:
958         * WebCore.vcproj/WebCore.vcproj:
959         * WebCore.xcodeproj/project.pbxproj:
960         * css/html.css:
961         (progress):
962         (progress::-webkit-progress-bar):
963         (progress::-webkit-progress-value):
964         * html/HTMLProgressElement.cpp:
965         (WebCore::HTMLProgressElement::~HTMLProgressElement):
966         (WebCore::HTMLProgressElement::create):
967         (WebCore::HTMLProgressElement::attach):
968         (WebCore::HTMLProgressElement::didElementStateChange):
969         (WebCore::HTMLProgressElement::createShadowSubtree):
970         * html/HTMLProgressElement.h:
971         * html/shadow/ProgressShadowElement.cpp: Copied from Source/WebCore/html/shadow/ProgressBarValueElement.h.
972         (WebCore::ProgressShadowElement::ProgressShadowElement):
973         (WebCore::ProgressShadowElement::progressElement):
974         (WebCore::ProgressShadowElement::rendererIsNeeded):
975         (WebCore::ProgressBarElement::shadowPseudoId):
976         (WebCore::ProgressValueElement::shadowPseudoId):
977         (WebCore::ProgressValueElement::setWidthPercentage):
978         * html/shadow/ProgressShadowElement.h: Renamed from Source/WebCore/html/shadow/ProgressBarValueElement.h.
979         (WebCore::ProgressBarElement::ProgressBarElement):
980         (WebCore::ProgressBarElement::create):
981         (WebCore::ProgressValueElement::ProgressValueElement):
982         (WebCore::ProgressValueElement::create):
983         * rendering/RenderProgress.cpp:
984         (WebCore::RenderProgress::RenderProgress):
985         (WebCore::RenderProgress::updateFromElement):
986         (WebCore::RenderProgress::animationTimerFired):
987         * rendering/RenderProgress.h:
988         (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
989         (WebCore::RenderProgress::canHaveChildren):
990
991 2011-04-06  Mario Sanchez Prada  <msanchez@igalia.com>
992
993         Reviewed by Chris Fleizach.
994
995         [GTK] Do not reference AccessibilityRenderObject from platform dependent code
996         https://bugs.webkit.org/show_bug.cgi?id=57955
997
998         Do not reference AccessibilityRenderObject from platform specific code
999
1000         Added new virtual functions to AccessibilityObject.h and removed
1001         explicit references to AccessibilityRenderObject from GTK code.
1002
1003         * accessibility/AccessibilityObject.h:
1004         (WebCore::AccessibilityObject::renderer): New virtual method,
1005         returning 0 by default. Overriden by AccessibilityRenderObject.
1006         (WebCore::AccessibilityObject::correspondingLabelForControlElement):
1007         New virtual method, returning 0 by default. It complements the
1008         already present method correspondingControlForLabelElement().
1009
1010         * accessibility/AccessibilityRenderObject.h:
1011         (WebCore::AccessibilityRenderObject::renderer): Made virtual.
1012
1013         * accessibility/gtk/AXObjectCacheAtk.cpp:
1014         (WebCore::emitTextChanged): Reference  AccessibilityObject,
1015         instead of AccessibilityRenderObject.
1016         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1017         Ditto.
1018
1019         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1020         (webkit_accessible_get_name): Do not reference
1021         AccessibilityRenderObject.
1022         (webkit_accessible_get_description): Ditto.
1023         (setAtkRelationSetFromCoreObject): Ditto.
1024         (optionFromList): Ditto.
1025         (optionFromSelection): Ditto.
1026         (webkit_accessible_selection_clear_selection): Ditto.
1027         (webkit_accessible_selection_get_selection_count): Ditto.
1028         (webkit_accessible_selection_select_all_selection): Ditto.
1029         (textForObject): Ditto.
1030         (webkit_accessible_text_get_text): Ditto.
1031         (getPangoLayoutForAtk): Ditto.
1032         (webkit_accessible_text_get_caret_offset): Ditto.
1033         (baselinePositionForRenderObject): Ditto.
1034         (getAttributeSetForAccessibilityObject): Ditto.
1035         (accessibilityObjectLength): Ditto.
1036         (getSelectionOffsetsForObject): Ditto.
1037         (webkit_accessible_text_set_selection): Ditto.
1038         (webkit_accessible_text_set_caret_offset): Ditto.
1039         (webkit_accessible_table_get_caption): Ditto.
1040         (getInterfaceMaskFromObject): Ditto.
1041
1042         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
1043         (getRangeLengthForObject): Ditto.
1044
1045         Removed unused renderer() method from AccessibilityMenuList.
1046
1047         * accessibility/AccessibilityMenuList.h: Removed unused method.
1048         * accessibility/AccessibilityMenuList.cpp: Removed unused method.
1049
1050 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
1051
1052         Reviewed by Pavel Feldman.
1053
1054         Web Inspector: Javascipt warning link expand and overlap with icons in js console
1055         https://bugs.webkit.org/show_bug.cgi?id=57939
1056
1057         * inspector/front-end/inspector.js:
1058         (WebInspector.linkifyURLAsNode):
1059
1060 2011-04-06  Alexander Pavlov  <apavlov@chromium.org>
1061
1062         Reviewed by Pavel Feldman.
1063
1064         Web Inspector: Beautify parameter names in Inspector.json (CSS domain)
1065         https://bugs.webkit.org/show_bug.cgi?id=57931
1066
1067         * inspector/Inspector.json:
1068
1069 2011-04-06  Jia Pu  <jpu@apple.com>
1070
1071         Reviewed by Darin Adler.
1072
1073         [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
1074         https://bugs.webkit.org/show_bug.cgi?id=57665
1075         <rdar://problem/7350477>
1076
1077         We need to track how user modified an autocorrected word. If he changed it back to original
1078         text, we want to record AutocorrectionReverted response. And if he changed it to something
1079         else, we want to record AutocorrectionEdited response.
1080
1081         To achieve this, we need to distringuish between text replacement caused by autocorrection
1082         from that due to other causes, such as reversion, text substitution, etc. So we added a new
1083         marker type "Autocorrected". We also need to be able to check for correction, even when we
1084         don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
1085         value, "CheckForCorrection".
1086
1087         We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
1088         specified range, and of specified type.
1089
1090         * dom/DocumentMarker.h:
1091         * dom/DocumentMarkerController.cpp:
1092         (WebCore::DocumentMarkerController::markersInRange):
1093         (WebCore::DocumentMarkerController::hasMarkers):
1094         * dom/DocumentMarkerController.h:
1095         * editing/Editor.cpp:
1096         (WebCore::markerTypesForAutocorrection):
1097         (WebCore::markersHaveIdenticalDescription):
1098         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1099         (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
1100         (WebCore::Editor::changeBackToReplacedString):
1101         (WebCore::Editor::markMisspellingsAndBadGrammar):
1102         (WebCore::Editor::applyCorrectionPanelInfo):
1103         (WebCore::Editor::unappliedSpellCorrection):
1104         (WebCore::Editor::textCheckingTypeMaskFor):
1105         * editing/Editor.h:
1106         * editing/SpellingCorrectionCommand.cpp:
1107         (WebCore::SpellingCorrectionCommand::doApply):
1108
1109 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1110
1111         Unreviewed, rolling out r83045.
1112         http://trac.webkit.org/changeset/83045
1113         https://bugs.webkit.org/show_bug.cgi?id=57953
1114
1115         Broke win layout tests (Requested by podivilov on #webkit).
1116
1117         * GNUmakefile.am:
1118         * inspector/front-end/DebuggerPresentationModel.js:
1119         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1120         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1121
1122 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1123
1124         Moved the declaration of positionNewFloatOnLine in RenderBlock.h after r83042.
1125
1126         * rendering/RenderBlock.h:
1127
1128 2011-03-27  Diego Gonzalez  <diegohcg@webkit.org>
1129
1130         Reviewed by Kenneth Rohde Christiansen.
1131
1132         [Qt] Re-draw the <input> fields for Qt Mobile Theme to do not override elements already styled.
1133         https://bugs.webkit.org/show_bug.cgi?id=57007
1134
1135         * CodeGenerators.pri:
1136         * css/themeQtMobile.css: Removed.
1137         * platform/qt/QtMobileWebStyle.cpp:
1138         (drawRectangularControlBackground):
1139         (QtMobileWebStyle::drawPrimitive):
1140         (QtMobileWebStyle::drawComplexControl):
1141         * platform/qt/QtMobileWebStyle.h:
1142         * platform/qt/RenderThemeQt.cpp:
1143         (WebCore::RenderThemeQt::isControlStyled):
1144         (WebCore::RenderThemeQt::paintTextField):
1145
1146 2011-04-06  Jia Pu  <jpu@apple.com>
1147
1148         Reviewed by Darin Adler.
1149
1150         [Mac] When autocorrection occurs without showing correction panel, WebCore need to post accessibility notification.
1151         https://bugs.webkit.org/show_bug.cgi?id=57800
1152         <rdar://problem/9218223>
1153
1154         Defined a new accessibility notification type, AXAutocorrectionOccured. Editor::markAllMisspellingsAndBadGrammarInRanges()
1155         now posts said notification when any autocorrection or text replacement (e.g. replacing "(c)" with copyright mark) takes place.
1156
1157         * accessibility/AXObjectCache.h:
1158         * accessibility/chromium/AXObjectCacheChromium.cpp:
1159         (WebCore::AXObjectCache::postPlatformNotification):
1160         * accessibility/mac/AXObjectCacheMac.mm:
1161         (WebCore::AXObjectCache::postPlatformNotification):
1162         * editing/Editor.cpp:
1163         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1164
1165 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
1166
1167         Build fix for debug Cairo builds.
1168
1169         * platform/graphics/cairo/PlatformContextCairo.cpp:
1170         (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
1171
1172 2011-04-06  Diego Gonzalez  <diegohcg@webkit.org>
1173
1174         Reviewed by Antonio Gomes.
1175
1176         [Qt] Style fix for QtMobileWebStyle.h
1177         https://bugs.webkit.org/show_bug.cgi?id=57708
1178
1179         * platform/qt/QtMobileWebStyle.h:
1180
1181 2011-04-06  Andras Becsi  <abecsi@webkit.org>
1182
1183         Reviewed by Darin Adler.
1184
1185         Invalid color #{predefined colorName} is accepted by the CSS parser.
1186         https://bugs.webkit.org/show_bug.cgi?id=15360
1187
1188         Test: fast/css/invalid-predefined-color.html
1189
1190         * css/CSSGrammar.y: Remove superfluous hexcolor production.
1191         * css/tokenizer.flex: A hexadecimal number should consist of [a-fA-F0-9] values ({h}).
1192
1193 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
1194
1195         Reviewed by Pavel Feldman.
1196
1197         Web Inspector: add test for script formatter worker.
1198         https://bugs.webkit.org/show_bug.cgi?id=57447
1199
1200         Test: inspector/debugger/script-formatter.html
1201
1202         * GNUmakefile.am:
1203         * inspector/front-end/DebuggerPresentationModel.js:
1204         (WebInspector.DebuggerPresentationModel):
1205         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1206
1207 2011-04-06  Martin Robinson  <mrobinson@igalia.com>
1208
1209         Reviewed by Xan Lopez.
1210
1211         [Cairo] Hide the details of image masking in PlatformContextCairo
1212         https://bugs.webkit.org/show_bug.cgi?id=57878
1213
1214         No new tests. This is just a refactor.
1215
1216         * platform/graphics/GraphicsContext.h:
1217         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1218         (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
1219         do the actual cairo_save. Remove information about image masking.
1220         (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
1221         do the actual cairo_restore. Remove information about image masking.
1222         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1223         * platform/graphics/cairo/ImageBufferCairo.cpp:
1224         (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
1225         * platform/graphics/cairo/PlatformContextCairo.cpp:
1226         (WebCore::PlatformContextCairo::restore): Added.
1227         (WebCore::PlatformContextCairo::save): Added.
1228         (WebCore::PlatformContextCairo::pushImageMask): Added.
1229         * platform/graphics/cairo/PlatformContextCairo.h:
1230         (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
1231         (WebCore::ImageMaskInformation::isValid): Ditto.
1232         (WebCore::ImageMaskInformation::maskSurface): Ditto.
1233         (WebCore::ImageMaskInformation::maskRect): Ditto.
1234
1235 2011-04-02  Diego Gonzalez  <diegohcg@webkit.org>
1236
1237         Reviewed by Csaba Osztrogonác.
1238
1239         [Qt] Radio buttons are showing wrong with mobile theme
1240         https://bugs.webkit.org/show_bug.cgi?id=57706
1241
1242         * platform/qt/QtMobileWebStyle.cpp:
1243         (QtMobileWebStyle::drawRadio):
1244
1245 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1246
1247         Reviewed by Eric Seidel.
1248
1249         Move RenderBlock::positionNewFloatOnLine to RenderBlockLineLayout.cpp
1250         https://bugs.webkit.org/show_bug.cgi?id=57943
1251
1252         * rendering/RenderBlock.cpp: Removed positionNewFloatOnLine.
1253         * rendering/RenderBlockLineLayout.cpp:
1254         (WebCore::RenderBlock::positionNewFloatOnLine): Moved from RenderBlock.cpp
1255
1256 2011-04-05  Diego Gonzalez  <diegohcg@webkit.org>
1257
1258         Buildfix after r82125.
1259
1260         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
1261         https://bugs.webkit.org/show_bug.cgi?id=57087
1262
1263         * platform/qt/QtMobileWebStyle.cpp:
1264         (QtMobileWebStyle::findChecker):
1265         (QtMobileWebStyle::findRadio):
1266         (QtMobileWebStyle::findComboButton):
1267
1268 2011-04-06  Pavel Podivilov  <podivilov@chromium.org>
1269
1270         Reviewed by Yury Semikhatsky.
1271
1272         Web Inspector: inline script imports in ScriptFormatterWorker.js so it works in Safari release.
1273         https://bugs.webkit.org/show_bug.cgi?id=57641
1274
1275         * WebCore.xcodeproj/project.pbxproj:
1276         * gyp/streamline-inspector-source.sh:
1277         * inspector/combine-javascript-resources.pl: Renamed from Source/WebCore/combine-javascript-resources.
1278         * inspector/inline-javascript-imports.py: Added.
1279
1280 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
1281
1282         Reviewed by Eric Seidel.
1283
1284         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1285         https://bugs.webkit.org/show_bug.cgi?id=57872
1286
1287         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1288         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1289
1290         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1291         avoiding the tab span.
1292
1293         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1294
1295         Test: editing/inserting/insert-paragraph-separator-tab-span.html
1296
1297         * editing/EditingStyle.cpp:
1298         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1299         * editing/InsertParagraphSeparatorCommand.cpp:
1300         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1301         separator into a paragraph separator.
1302
1303 2011-04-06  Levi Weintraub  <leviw@chromium.org>
1304
1305         Reviewed by Ryosuke Niwa.
1306
1307         Add member functions for determining line/paragraph separation to InlineIterator
1308         https://bugs.webkit.org/show_bug.cgi?id=57938
1309
1310         Adding atTextParagraphSeparator and atParagraphSeparator inline convenience functions to
1311         InlineIterator, where it makes far more sense for them to be. Also moving
1312         shouldPreserveNewline to RenderObject and renaming it preservesNewline.
1313
1314         No new tests as this provides no new functionality.
1315
1316         * rendering/InlineIterator.h:
1317         (WebCore::InlineIterator::atTextParagraphSeparator):
1318         (WebCore::InlineIterator::atParagraphSeparator):
1319         * rendering/RenderBlockLineLayout.cpp:
1320         (WebCore::RenderBlock::requiresLineBox):
1321         (WebCore::RenderBlock::findNextLineBreak):
1322         * rendering/RenderObject.h:
1323         (WebCore::RenderObject::preservesNewline):
1324
1325 2011-04-05  Alexander Pavlov  <apavlov@chromium.org>
1326
1327         Reviewed by Pavel Feldman.
1328
1329         Web Inspector: Range insertNode function does not update content in the inspector
1330         https://bugs.webkit.org/show_bug.cgi?id=57829
1331
1332         * inspector/InspectorDOMAgent.cpp:
1333         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
1334         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
1335
1336 2011-04-06  Alejandro G. Castro  <alex@igalia.com>
1337
1338         Fix GTK3 compilation after r82962.
1339
1340         * platform/gtk/RenderThemeGtk3.cpp:
1341         (WebCore::paintToggle):
1342         (WebCore::renderButton):
1343         (WebCore::RenderThemeGtk::paintMenuList):
1344         (WebCore::RenderThemeGtk::paintTextField):
1345         (WebCore::RenderThemeGtk::paintSliderTrack):
1346         (WebCore::RenderThemeGtk::paintSliderThumb):
1347         (WebCore::RenderThemeGtk::paintProgressBar):
1348         (WebCore::paintSpinArrowButton):
1349         * platform/gtk/ScrollbarThemeGtk3.cpp:
1350         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1351         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
1352         (WebCore::ScrollbarThemeGtk::paintThumb):
1353         (WebCore::ScrollbarThemeGtk::paintButton):
1354
1355 2011-04-06  Andrey Kosyakov  <caseq@chromium.org>
1356
1357         Reviewed by Yury Semikhatsky.
1358
1359         Web Inspector: [Extensions API] remove inspectedPage.* events
1360         https://bugs.webkit.org/show_bug.cgi?id=57763
1361
1362         - Removed webInspector.inspectedPage.* events
1363         - moved onNavigated to webInspector.resources
1364
1365         * inspector/front-end/ExtensionAPI.js:
1366         (WebInspector.injectedExtensionAPI):
1367         (WebInspector.injectedExtensionAPI.InspectedWindow):
1368         * inspector/front-end/ExtensionAPISchema.json:
1369         * inspector/front-end/ExtensionServer.js:
1370         (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
1371         * inspector/front-end/inspector.js:
1372         (WebInspector.domContentEventFired):
1373         (WebInspector.loadEventFired):
1374         (WebInspector.inspectedURLChanged):
1375
1376 2011-04-06  Joseph Pecoraro  <joepeck@webkit.org>
1377
1378         Reviewed by Antti Koivisto.
1379
1380         Add <head> to the simpleUserAgentStyleSheet
1381         https://bugs.webkit.org/show_bug.cgi?id=57915
1382
1383         * css/CSSStyleSelector.cpp:
1384         (WebCore::elementCanUseSimpleDefaultStyle): add head to the
1385         simple stylesheet, display:none.
1386
1387 2011-04-05  Mikhail Naganov  <mnaganov@chromium.org>
1388
1389         Reviewed by Pavel Feldman.
1390
1391         Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
1392         https://bugs.webkit.org/show_bug.cgi?id=57856
1393
1394         Test: inspector/profiler/detailed-heapshots-summary.html
1395
1396         * inspector/front-end/DataGrid.js:
1397         (WebInspector.DataGrid):
1398         * inspector/front-end/DetailedHeapshotGridNodes.js:
1399         (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
1400         (WebInspector.HeapSnapshotGridNode.prototype._populate):
1401         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1402         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1403         (WebInspector.HeapSnapshotGridNode.prototype.sort):
1404         (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
1405         * inspector/front-end/DetailedHeapshotView.js:
1406         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
1407         * inspector/front-end/ProfilesPanel.js:
1408         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
1409         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
1410
1411 2011-04-06  Anders Bakken  <agbakken@gmail.com>
1412
1413         Reviewed by David Levin.
1414
1415         [Qt] SmartReplaceQt.cpp has coding-style errors
1416         https://bugs.webkit.org/show_bug.cgi?id=40261
1417
1418         This patch does not require new test cases.
1419
1420         * editing/qt/SmartReplaceQt.cpp:
1421         (WebCore::isCharacterSmartReplaceExempt):
1422
1423 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
1424
1425         Reviewed by Ryosuke Niwa.
1426
1427         REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
1428         https://bugs.webkit.org/show_bug.cgi?id=57755
1429
1430         Test: editing/execCommand/insert-line-break-onload.html
1431
1432         * editing/TypingCommand.cpp:
1433         (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
1434
1435 2011-04-05  Antti Koivisto  <antti@apple.com>
1436
1437         Reviewed by Cameron Zwarich.
1438
1439         Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
1440         https://bugs.webkit.org/show_bug.cgi?id=57914
1441
1442         Don't call adjustedDeferredRepaintDelay unnecessarily.
1443
1444         * page/FrameView.cpp:
1445         (WebCore::FrameView::repaintContentRectangle):
1446         (WebCore::FrameView::adjustedDeferredRepaintDelay):
1447
1448 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
1449
1450         Reviewed by David Levin.
1451
1452         Update call to SkAdvancedTypefaceMetrics to new API.
1453         https://bugs.webkit.org/show_bug.cgi?id=57887
1454
1455         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1456         (WebCore::FontPlatformData::emSizeInFontUnits):
1457
1458 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
1459
1460         Reviewed by Darin Adler.
1461
1462         Rename event dispatching functions after form event removal
1463         https://bugs.webkit.org/show_bug.cgi?id=57908
1464
1465         * dom/InputElement.cpp:
1466         (WebCore::InputElement::setValueFromRenderer):
1467         * dom/Node.cpp:
1468         (WebCore::Node::dispatchChangeEvent):
1469         (WebCore::Node::dispatchInputEvent):
1470         (WebCore::Node::defaultEventHandler):
1471         * dom/Node.h:
1472         * html/HTMLFormControlElement.cpp:
1473         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1474         (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
1475         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
1476         Renamed "events" to "event", since there is only one event to dispatch now.
1477
1478 2011-04-05  Anders Bakken  <agbakken@gmail.com>
1479
1480         Reviewed by David Levin.
1481
1482         [Qt] DragControllerQt.cpp has coding-style errors
1483         https://bugs.webkit.org/show_bug.cgi?id=40258
1484
1485         This patch does not require new test cases.
1486
1487         * page/qt/DragControllerQt.cpp:
1488         (WebCore::DragController::dragOperation):
1489
1490 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
1491
1492         Reviewed by David Levin.
1493
1494         Update deprecated include: platform_canvas_win.h to platform_canvas.h.
1495         https://bugs.webkit.org/show_bug.cgi?id=57896
1496
1497         * platform/graphics/chromium/FontChromiumWin.cpp:
1498
1499 2011-04-05  Darin Adler  <darin@apple.com>
1500
1501         Try to fix Leopard bots.
1502
1503         * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
1504         to have intended it.
1505
1506 2011-04-05  Darin Adler  <darin@apple.com>
1507
1508         Try to fix Leopard bots.
1509
1510         * platform/mac/HTMLConverter.mm: Move declarations of new functions
1511         inside the appropriate #if.
1512
1513 2011-04-05  Adrienne Walker  <enne@google.com>
1514
1515         Reviewed by Tony Chang.
1516
1517         Correctly set color when using skia's fillRoundedRect.
1518         https://bugs.webkit.org/show_bug.cgi?id=57907
1519
1520         * platform/graphics/skia/GraphicsContextSkia.cpp:
1521         (WebCore::GraphicsContext::fillRoundedRect):
1522
1523 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
1524
1525         Reviewed by Darin Adler.
1526
1527         Move attributedStringFromRange down to WebCore
1528         https://bugs.webkit.org/show_bug.cgi?id=57905
1529
1530         No change in behavior, so no new tests.
1531
1532         Also tweaked HTMLConverter to not use methods defined in WebKit.
1533
1534         * WebCore.exp.in:
1535         * WebCore.xcodeproj/project.pbxproj:
1536         * platform/mac/HTMLConverter.h:
1537         * platform/mac/HTMLConverter.mm:
1538         (-[WebHTMLConverter _newTabForElement:]):
1539         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1540         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1541         (fileWrapperForURL):
1542         (fileWrapperForElement):
1543         * platform/mac/PasteboardMac.mm:
1544         (WebCore::Pasteboard::writeSelection):
1545         * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
1546         * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
1547         (WebCore::attributedStringByStrippingAttachmentCharacters):
1548
1549 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
1550
1551         Reviewed by Darin Adler.
1552
1553         Rename variables in border drawing code for readability
1554         https://bugs.webkit.org/show_bug.cgi?id=57894
1555
1556         * rendering/RenderObject.cpp:
1557         (WebCore::RenderObject::drawLineForBoxSide):
1558         (WebCore::RenderObject::drawBoxSideFromPath):
1559         (WebCore::RenderObject::drawArcForBoxSide):
1560
1561 2011-04-05  Antti Koivisto  <antti@apple.com>
1562
1563         Reviewed by Darin Adler.
1564
1565         Defer repaints during style recalc
1566         https://bugs.webkit.org/show_bug.cgi?id=57886
1567
1568         This reduces the need to do (often expensive) platform surface invalidation.
1569         We already do this during layout but style recalculation may trigger
1570         invalidation as well.
1571     
1572         * dom/Document.cpp:
1573         (WebCore::Document::recalcStyle):
1574
1575 2011-04-05  Jer Noble  <jer.noble@apple.com>
1576
1577         Reviewed by Darin Adler.
1578
1579         HTML5 Player Has no Fullscreen Mode
1580         https://bugs.webkit.org/show_bug.cgi?id=57795
1581
1582         * html/HTMLVideoElement.cpp:
1583         (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
1584             supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
1585
1586 2011-04-05  Vsevolod Vlasov  <vsevik@chromium.org>
1587
1588         Reviewed by Pavel Feldman.
1589
1590         Web Inspector: fix data url's status and timing the network panel.
1591         https://bugs.webkit.org/show_bug.cgi?id=53066
1592
1593         Added data url support for status of network resources.
1594
1595         * English.lproj/localizedStrings.js:
1596         * inspector/front-end/NetworkPanel.js:
1597         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
1598         * inspector/front-end/Resource.js:
1599         (WebInspector.Resource.prototype.isDataURL):
1600
1601 2011-04-04  Vitaly Repeshko  <vitalyr@chromium.org>
1602
1603         Reviewed by Adam Barth.
1604
1605         [V8] Keep dirty primitive CSS values alive.
1606         https://bugs.webkit.org/show_bug.cgi?id=57810
1607
1608         * bindings/v8/V8GCController.cpp:
1609         (WebCore::GrouperVisitor::visitDOMWrapper):
1610
1611 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
1612
1613         Reviewed by Adele Peterson.
1614
1615         Add a fast path for simple color backgrounds
1616         https://bugs.webkit.org/show_bug.cgi?id=57773
1617
1618         Add a fast path for drawing simple color backgrounds. It's
1619         faster to fill a path or rect than it is to set up a clip,
1620         and then paint the rect.
1621         
1622         No visible behavior change so no new tests.
1623
1624         * rendering/RenderBoxModelObject.cpp:
1625         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1626
1627 2011-04-05  Patrick Gansterer  <paroga@webkit.org>
1628
1629         Unreviewed EFL build fix for r82962.
1630
1631         * CMakeListsEfl.txt:
1632
1633 2011-04-05  Chris Rogers  <crogers@google.com>
1634
1635         Reviewed by Kenneth Russell.
1636
1637         Add support for offline audio rendering to AudioContext API
1638         https://bugs.webkit.org/show_bug.cgi?id=57676
1639
1640         No new tests since audio API is not yet implemented.
1641
1642         * DerivedSources.make:
1643         * WebCore.gypi:
1644         * WebCore.xcodeproj/project.pbxproj:
1645         * bindings/js/JSAudioContextCustom.cpp:
1646         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1647         * bindings/js/JSEventCustom.cpp:
1648         (WebCore::toJS):
1649         * bindings/js/JSEventTarget.cpp:
1650         (WebCore::toJS):
1651         * bindings/v8/V8DOMWrapper.cpp:
1652         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1653         * bindings/v8/custom/V8AudioContextCustom.cpp:
1654         (WebCore::V8AudioContext::constructorCallback):
1655         * bindings/v8/custom/V8EventCustom.cpp:
1656         (WebCore::toV8):
1657         * dom/Event.cpp:
1658         (WebCore::Event::isOfflineAudioCompletionEvent):
1659         * dom/Event.h:
1660         * dom/EventTarget.cpp:
1661         (WebCore::EventTarget::toAudioContext):
1662         * dom/EventTarget.h:
1663         * platform/audio/HRTFDatabaseLoader.cpp:
1664         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1665         * platform/audio/HRTFDatabaseLoader.h:
1666         (WebCore::HRTFDatabaseLoader::loader):
1667         * webaudio/AudioContext.cpp:
1668         (WebCore::AudioContext::createOfflineContext):
1669         (WebCore::AudioContext::AudioContext):
1670         (WebCore::AudioContext::constructCommon):
1671         (WebCore::AudioContext::document):
1672         (WebCore::AudioContext::scriptExecutionContext):
1673         (WebCore::AudioContext::toAudioContext):
1674         (WebCore::AudioContext::startRendering):
1675         (WebCore::AudioContext::fireCompletionEvent):
1676         * webaudio/AudioContext.h:
1677         (WebCore::AudioContext::isOfflineContext):
1678         (WebCore::AudioContext::eventTargetData):
1679         (WebCore::AudioContext::ensureEventTargetData):
1680         (WebCore::AudioContext::refEventTarget):
1681         (WebCore::AudioContext::derefEventTarget):
1682         * webaudio/AudioContext.idl:
1683         * webaudio/AudioDestinationNode.cpp:
1684         (WebCore::AudioDestinationNode::AudioDestinationNode):
1685         * webaudio/AudioDestinationNode.h:
1686         (WebCore::AudioDestinationNode::reset):
1687         (WebCore::AudioDestinationNode::numberOfChannels):
1688         * webaudio/ConvolverNode.cpp:
1689         (WebCore::ConvolverNode::setBuffer):
1690         * webaudio/DefaultAudioDestinationNode.cpp: Added.
1691         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
1692         (WebCore::DefaultAudioDestinationNode::~DefaultAudioDestinationNode):
1693         (WebCore::DefaultAudioDestinationNode::initialize):
1694         (WebCore::DefaultAudioDestinationNode::uninitialize):
1695         (WebCore::DefaultAudioDestinationNode::startRendering):
1696         * webaudio/DefaultAudioDestinationNode.h: Added.
1697         (WebCore::DefaultAudioDestinationNode::create):
1698         (WebCore::DefaultAudioDestinationNode::sampleRate):
1699         * webaudio/OfflineAudioCompletionEvent.cpp: Added.
1700         (WebCore::OfflineAudioCompletionEvent::create):
1701         (WebCore::OfflineAudioCompletionEvent::OfflineAudioCompletionEvent):
1702         (WebCore::OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent):
1703         (WebCore::OfflineAudioCompletionEvent::isOfflineAudioCompletionEvent):
1704         * webaudio/OfflineAudioCompletionEvent.h: Added.
1705         (WebCore::OfflineAudioCompletionEvent::renderedBuffer):
1706         * webaudio/OfflineAudioCompletionEvent.idl: Added.
1707         * webaudio/OfflineAudioDestinationNode.cpp: Added.
1708         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
1709         (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode):
1710         (WebCore::OfflineAudioDestinationNode::initialize):
1711         (WebCore::OfflineAudioDestinationNode::uninitialize):
1712         (WebCore::OfflineAudioDestinationNode::startRendering):
1713         (WebCore::OfflineAudioDestinationNode::renderEntry):
1714         (WebCore::OfflineAudioDestinationNode::render):
1715         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch):
1716         (WebCore::OfflineAudioDestinationNode::notifyComplete):
1717         * webaudio/OfflineAudioDestinationNode.h: Added.
1718         (WebCore::OfflineAudioDestinationNode::create):
1719         (WebCore::OfflineAudioDestinationNode::sampleRate):
1720
1721 2011-04-05  Martin Robinson  <mrobinson@igalia.com>
1722
1723         Reviewed by Eric Seidel.
1724
1725         [Cairo] Better separate the concerns of GraphicsContextCairo
1726         https://bugs.webkit.org/show_bug.cgi?id=55150
1727
1728         Add a PlatformContextCairo which right now stores the cairo_t* for a
1729         GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
1730         and image masking layers into this PlatformContextCairo class.
1731
1732         No new tests. This patch is only a code cleanup.
1733
1734         * GNUmakefile.am:
1735         * platform/graphics/GraphicsContext.h: The platform context is no longer a
1736         cairo_t, but our new class the PlatformContextCairo.
1737         * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j
1738         * platform/graphics/cairo/FontCairo.cpp: Ditto.
1739         * platform/graphics/cairo/GradientCairo.cpp: Ditto.
1740         * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical
1741         changes which now reference platformContext()->cr() to get the cairo_t.
1742         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the
1743         PlatformContextCairo instead of the cairo_t.
1744         * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class.
1745         * platform/graphics/cairo/ImageCairo.cpp: Ditto.
1746         * platform/graphics/cairo/PathCairo.cpp: Ditto.
1747         * platform/graphics/cairo/PlatformContextCairo.cpp: Added.
1748         * platform/graphics/cairo/PlatformContextCairo.h: Added.
1749         * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class.
1750         * platform/graphics/gtk/IconGtk.cpp: Ditto.
1751         * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out
1752         m_data with a private section containing the platform context instead of
1753         just a cairo_t.
1754         * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class.
1755         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
1756         (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto.
1757         * plugins/gtk/PluginViewGtk.cpp: Ditto.
1758
1759 2011-04-05  David Dorwin  <ddorwin@chromium.org>
1760
1761         Reviewed by David Levin.
1762
1763         Fullscreen code assumes all layers use GPU compositing when USE(ACCELERATED_COMPOSITING)
1764         https://bugs.webkit.org/show_bug.cgi?id=57400
1765
1766         Check whether the full screen renderer layer is being composited by the GPU before assuming that the backing is valid. 
1767         Accelerated compositing may be compiled in but disabled at runtime or for some elements.
1768
1769         Tests: Fullscreen layout tests on Chromium.
1770
1771         * dom/Document.cpp:
1772         (WebCore::Document::webkitWillEnterFullScreenForElement):
1773         (WebCore::Document::webkitDidEnterFullScreenForElement):
1774         (WebCore::Document::webkitWillExitFullScreenForElement):
1775
1776 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
1777
1778         Reviewed by Dirk Schulze.
1779
1780         Regression: Invalid write in SVGTextLayoutEngine
1781         https://bugs.webkit.org/show_bug.cgi?id=57721
1782
1783         Properly stop layout if all metrics object refer to zero-width/height characters,
1784         which can happen for instance when using <text font-size="0">.
1785
1786         Test: svg/text/font-size-null-assertion.svg
1787
1788         * rendering/svg/SVGTextLayoutEngine.cpp:
1789         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
1790         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
1791
1792 2011-04-04 MORITA Hajime  <morrita@google.com>
1793
1794         Reviewed by Ryosuke Niwa.
1795
1796         [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
1797         https://bugs.webkit.org/show_bug.cgi?id=56085
1798         
1799         Removed WebCore::SpellCheckingResult and replaced it with TextCheckingResult.
1800         This change also added TextCheckerClient::requestCheckingOfString() should have
1801         TextCheckingTypeMask as a parameter to control text checking type.
1802
1803         * WebCore.exp.in:
1804         * editing/Editor.cpp:
1805         (WebCore::Editor::replaceSelectionWithFragment):
1806         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1807         (WebCore::Editor::textCheckingTypeMaskFor): Extracted from markAllMisspellingsAndBadGrammarInRanges()
1808         * editing/SpellChecker.cpp:
1809         (WebCore::SpellChecker::requestCheckingFor): Added a parameter.
1810         (WebCore::SpellChecker::markAt): Extracted from didCheck(), Added a check for the GrammarDetail object.
1811         (WebCore::SpellChecker::didCheck):
1812         * editing/SpellChecker.h:
1813         * loader/EmptyClients.h:
1814         (WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
1815         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
1816         * platform/text/TextCheckerClient.h:
1817
1818 2011-04-04  Antti Koivisto  <antti@apple.com>
1819
1820         Reviewed by Sam Weinig.
1821
1822         Print stylesheet on nytimes.com loads too early
1823         https://bugs.webkit.org/show_bug.cgi?id=57814
1824
1825         Don't load resources with Very Low priority until there are no other resources to 
1826         load for the host (or until document is complete enough that we stop limiting requests).
1827
1828         No tests, this is  difficult to observe reliably with our current testing infrastructure.
1829         Verified working with Wireshark.
1830
1831         * loader/ResourceLoadScheduler.cpp:
1832         (WebCore::ResourceLoadScheduler::servePendingRequests):
1833         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
1834         * loader/ResourceLoadScheduler.h:
1835
1836 2011-04-04  Steve Block  <steveblock@google.com>
1837
1838         Reviewed by Dimitri Glazkov.
1839
1840         JavaInstance should be a pure interface
1841         https://bugs.webkit.org/show_bug.cgi?id=55383
1842
1843         This patch fixes JavaInstance for V8 only.
1844
1845         It factors out a JavaInstance interface which does not use JNI
1846         types. This will allow the Java bridge to be used with objects
1847         that don't use JNI directly. The existing jobject-backed
1848         implementation is moved to a new JavaInstanceJobject class which
1849         implements the interface.
1850
1851         No new tests, refactoring only.
1852
1853         * Android.v8bindings.mk:
1854         * WebCore.gypi:
1855         * bridge/jni/JobjectWrapper.h:
1856         * bridge/jni/v8/JNIUtilityPrivate.cpp:
1857         (JSC::Bindings::jvalueToJavaValue):
1858         (JSC::Bindings::javaValueToJvalue):
1859         * bridge/jni/v8/JavaInstanceJobjectV8.cpp:
1860         (JavaInstanceJobject::JavaInstanceJobject):
1861         (JavaInstanceJobject::~JavaInstanceJobject):
1862         (JavaInstanceJobject::begin):
1863         (JavaInstanceJobject::end):
1864         (JavaInstanceJobject::getClass):
1865         (JavaInstanceJobject::invokeMethod):
1866         (JavaInstanceJobject::getField):
1867         * bridge/jni/v8/JavaInstanceJobjectV8.h: Copied from Source/WebCore/bridge/jni/v8/JavaInstanceV8.h.
1868         (JSC::Bindings::JavaInstanceJobject::javaInstance):
1869         * bridge/jni/v8/JavaInstanceV8.h:
1870         (JSC::Bindings::JavaInstance::~JavaInstance):
1871
1872 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
1873
1874        Reviewed by Darin Adler.
1875
1876         Move MouseEvent-dispatching logic into MouseEventDispatchMediator.
1877         https://bugs.webkit.org/show_bug.cgi?id=57639
1878
1879         Refactoring, covered by existing tests.
1880
1881         * dom/EventDispatcher.cpp:
1882         (WebCore::EventDispatcher::dispatchEvent): Moved useful assertion here
1883             from dispatchMouseEvent.
1884         (WebCore::EventDispatcher::adjustRelatedTarget): Converted into a method.
1885         * dom/EventDispatcher.h: Adjusted decls.
1886         (WebCore::EventDispatcher::node): Added.
1887         * dom/MouseEvent.cpp:
1888         (WebCore::MouseEvent::create): Moved useful assertion here from
1889             dispatchMouseEvent.
1890         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator): Added.
1891         (WebCore::MouseEventDispatchMediator::event): Added.
1892         (WebCore::MouseEventDispatchMediator::dispatchEvent): Added.
1893         * dom/MouseEvent.h:
1894         (WebCore::MouseEvent::setRelatedTarget): Added.
1895         * dom/Node.cpp:
1896         (WebCore::Node::dispatchMouseEvent): Changed to use MouseEventDispatchMediator.
1897
1898 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
1899
1900         Reviewed by Adam Roben & Dirk Schulze.
1901
1902         text-tspan-02-b.svg from SVG 1.1 2nd edition fails
1903         https://bugs.webkit.org/show_bug.cgi?id=57831
1904
1905         We were not spanning rotation values correcty accross text children, which resulted in text-span-02-b.svg misrendering.
1906         While rewriting the rotation specific code, it came apparent that the LayoutScope concept is flawed in general and
1907         should be replaced by a global list of x/y/dx/dy/rotate values for the whole text subtree. This makes it much simpler
1908         to implement the demand that the last rotation value spans the whole scope. A follow-up patch will optimize the
1909         required memory.
1910
1911         Example:
1912         <text rotate="10,20,999,50">AB<tspan rotate="30">CDE</>FGH</text>
1913     
1914         text:   A  B  C  D  E  F  G  H
1915         rotate="10 20 30 30 30 50 50 50"
1916
1917         Tests: svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg
1918                svg/text/text-midpoint-split-bug.svg
1919
1920         * rendering/RenderBlockLineLayout.cpp:     Move SVG specific midpoint creation after the non-SVG specific code that may mutate the midpoints. otherwhise we end up in an
1921         (WebCore::RenderBlock::findNextLineBreak): inconsistent state. We were intereferring with the ignoreSpaces code resulting in wrong truncations - covered by new testcase.
1922         * rendering/svg/SVGTextLayoutAttributes.cpp:
1923         (WebCore::SVGTextLayoutAttributes::reserveCapacity): Also reserveCapacity for the text metrics list (minor optimization).
1924         (WebCore::SVGTextLayoutAttributes::fillWithEmptyValue): Added helper function for use from SVGTextLayoutAttributesBuilder.
1925         (WebCore::SVGTextLayoutAttributes::appendEmptyValue): Ditto.
1926         (WebCore::safeValueAtPosition): Ditto. (Inline helper)
1927         (WebCore::SVGTextLayoutAttributes::appendSingleValueFromAttribute): Ditto.
1928         * rendering/svg/SVGTextLayoutAttributes.h: Ditto.
1929         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Rewrite code, see explaination above.
1930         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree):
1931         (WebCore::processRenderSVGInlineText):
1932         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
1933         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForAllCharacters):
1934         (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
1935         (WebCore::fillListAtPosition):
1936         (WebCore::SVGTextLayoutAttributesBuilder::fillAttributesAtPosition):
1937         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
1938         (WebCore::SVGTextLayoutAttributesBuilder::TextPosition::TextPosition):
1939
1940 2011-04-05  Levi Weintraub  <leviw@chromium.org>
1941
1942         Reviewed by Ryosuke Niwa.
1943
1944         DeleteButtonController is given invalid style
1945         https://bugs.webkit.org/show_bug.cgi?id=57853
1946
1947         DeleteButtonController was assigned an invalid style that can lead to assertions
1948         in debug builds. This matches up the code with its intent.
1949
1950         No new tests as this changes nothing on release builds.
1951
1952         * editing/DeleteButtonController.cpp:
1953         (WebCore::DeleteButtonController::createDeletionUI):
1954
1955 2011-04-05  Anders Bakken  <agbakken@gmail.com>
1956
1957         Reviewed by Laszlo Gombos.
1958
1959         [Qt] EditorQt.cpp has coding-style errors
1960         https://bugs.webkit.org/show_bug.cgi?id=40260
1961         
1962         This patch does not require new test cases.
1963
1964         * editing/qt/EditorQt.cpp:
1965
1966 2011-04-05  Pavel Podivilov  <podivilov@chromium.org>
1967
1968         Reviewed by Pavel Feldman.
1969
1970         Web Inspector: go to line dialog highlights wrong line.
1971         https://bugs.webkit.org/show_bug.cgi?id=57845
1972
1973         * inspector/front-end/GoToLineDialog.js:
1974         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
1975
1976 2011-04-05  Luke Macpherson   <macpherson@chromium.org>
1977
1978         Reviewed by Dimitri Glazkov.
1979
1980         Implement CSSPropertyDirection in CSSStyleApplyProperty
1981         https://bugs.webkit.org/show_bug.cgi?id=57608
1982
1983         No new tests required as no new functionality introduced.
1984
1985         * css/CSSStyleApplyProperty.cpp:
1986         Add implementation class for CSSPropertyDirection
1987         * css/CSSStyleSelector.cpp:
1988         Remove existing implementation for CSSPropertyDirection
1989         * css/CSSStyleSelector.h:
1990         Add getter for element
1991
1992 2011-04-05  Leandro Gracia Gil  <leandrogracia@chromium.org>
1993
1994         Reviewed by Steve Block.
1995
1996         Factoring the creation of 'FunctionOnly' callbacks in V8.
1997         https://bugs.webkit.org/show_bug.cgi?id=57760
1998
1999         This method creates a template from an existing functionality in V8GeolocationCustom.cpp
2000         to V8Utilities to be used by the custom bindings of both Geolocation and the Media Stream API.
2001
2002         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2003
2004         * bindings/v8/V8Utilities.cpp:
2005         (WebCore::throwTypeMismatchException):
2006         * bindings/v8/V8Utilities.h:
2007         (WebCore::createFunctionOnlyCallback):
2008         * bindings/v8/custom/V8GeolocationCustom.cpp:
2009         (WebCore::V8Geolocation::getCurrentPositionCallback):
2010         (WebCore::V8Geolocation::watchPositionCallback):
2011
2012 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2013
2014         Reviewed by Andreas Kling.
2015
2016         Switch from Vector<UChar> to StringBuilder in bindings/
2017         https://bugs.webkit.org/show_bug.cgi?id=57838
2018
2019         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2020         (WebCore::cssPropertyName):
2021         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2022         (WebCore::cssPropertyInfo):
2023
2024 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2025
2026         Reviewed by Andreas Kling.
2027
2028         Switch from Vector<UChar> to StringBuilder in accessibility/
2029         https://bugs.webkit.org/show_bug.cgi?id=57837
2030
2031         * accessibility/AccessibilityObject.cpp:
2032         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
2033         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
2034         * accessibility/AccessibilityRenderObject.cpp:
2035         (WebCore::AccessibilityRenderObject::accessibilityDescriptionForElements):
2036
2037 2011-04-05  Andrey Adaikin  <aandrey@google.com>
2038
2039         Reviewed by Pavel Feldman.
2040
2041         Web Inspector: Scripts with syntax errors are cropped in the UI
2042         https://bugs.webkit.org/show_bug.cgi?id=57828
2043
2044         * inspector/front-end/SourceFrame.js:
2045         (WebInspector.SourceFrame.prototype.addMessageToSource):
2046
2047 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
2048
2049         Reviewed by Darin Adler.
2050
2051         Remove onformchange and onforminput events/event handlers
2052         https://bugs.webkit.org/show_bug.cgi?id=55755
2053         <rdar://problem/9087969>
2054
2055         Covered by existing tests.
2056
2057         * dom/Document.h:
2058         * dom/Document.idl:
2059         * dom/Element.h:
2060         * dom/Element.idl:
2061         * dom/Event.cpp:
2062         (WebCore::Event::fromUserGesture):
2063         * dom/EventNames.h:
2064         * html/FormAssociatedElement.h:
2065         * html/HTMLAttributeNames.in:
2066         * html/HTMLElement.cpp:
2067         (WebCore::HTMLElement::parseMappedAttribute):
2068         * html/HTMLElement.h:
2069         * html/HTMLFormControlElement.h:
2070         (WebCore::HTMLFormControlElement::isEnumeratable):
2071         * html/HTMLFormElement.cpp:
2072         * html/HTMLFormElement.h:
2073         * html/HTMLFormElement.idl:
2074         * html/HTMLInputElement.h:
2075         * html/HTMLKeygenElement.h:
2076         * html/HTMLObjectElement.h:
2077         (WebCore::HTMLObjectElement::isEnumeratable):
2078         * html/HTMLOutputElement.h:
2079         (WebCore::HTMLOutputElement::isEnumeratable):
2080         * html/HTMLSelectElement.h:
2081         (WebCore::HTMLSelectElement::isEnumeratable):
2082         * html/HTMLTextAreaElement.h:
2083         (WebCore::HTMLTextAreaElement::isEnumeratable):
2084         * page/DOMWindow.h:
2085         * page/DOMWindow.idl:
2086
2087 2011-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2088
2089         Unreviewed, rolling out r82915.
2090         http://trac.webkit.org/changeset/82915
2091         https://bugs.webkit.org/show_bug.cgi?id=57825
2092
2093         Broke 270 chromium tests on win and linux (Requested by
2094         podivilov on #webkit).
2095
2096         * rendering/RenderThemeChromiumSkia.cpp:
2097         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
2098
2099 2011-04-05  James Simonsen  <simonjam@chromium.org>
2100
2101         Reviewed by Adam Barth.
2102
2103         Stop preload scanning CSS when it&apos;s impossible to have another @import.
2104         https://bugs.webkit.org/show_bug.cgi?id=57664
2105
2106         @import statements are only allowed at the beginning of a CSS file.
2107         Only comments or @charset can precede them. After seeing anything else,
2108         abort early so that we:
2109         - don't have to parse the rest of the CSS.
2110         - don't preload something that the regular parser won't load.
2111
2112         * html/parser/CSSPreloadScanner.cpp:
2113         (WebCore::CSSPreloadScanner::scan): Terminate early if we're done with @imports.
2114         (WebCore::CSSPreloadScanner::tokenize): Terminate early if we see a {} or any style rule.
2115         (WebCore::CSSPreloadScanner::emitRule): Only @charset or @import are allowed to precede @import.
2116         * html/parser/CSSPreloadScanner.h: Add DoneParsingImportRules state.
2117
2118 2011-04-05  Takayoshi Kochi <kochi@chromium.org>
2119
2120         Reviewed by Tony Chang.
2121
2122         [chromium] Specify 'sans-serif' as a fallback to the default UI font
2123         'Arial' for non-latin UI scripts (e.g. CJK).
2124         https://bugs.webkit.org/show_bug.cgi?id=55035
2125
2126         No new tests, because it may still fail if the system is not configured
2127         properly to resolve 'sans-serif' to existing real font file, thus even
2128         manual test is hard to systematically tell it is working properly.
2129
2130         * rendering/RenderThemeChromiumSkia.cpp
2131
2132 2011-04-05  Kent Tamura  <tkent@chromium.org>
2133
2134         Reviewed by Dimitri Glazkov.
2135
2136         Setting defaultValue on a textarea with a modified value still clobbers the value
2137         https://bugs.webkit.org/show_bug.cgi?id=57636
2138
2139         If the dirty flag is true, we shouldn't update the value when the
2140         defaultValue is updated
2141
2142         Test: fast/forms/textarea-set-defaultvalue-after-value.html
2143
2144         * html/HTMLTextAreaElement.cpp:
2145         (WebCore::HTMLTextAreaElement::childrenChanged):
2146         (WebCore::HTMLTextAreaElement::setDefaultValue):
2147
2148 2011-04-04  Kent Tamura  <tkent@chromium.org>
2149
2150         Add a case label which was unexpectedly removed in r82899.
2151         https://bugs.webkit.org/show_bug.cgi?id=50661
2152
2153         * css/CSSSelector.cpp:
2154         (WebCore::CSSSelector::extractPseudoType):
2155
2156 2011-04-04  Dan Bernstein  <mitz@apple.com>
2157
2158         Reviewed by Simon Fraser.
2159
2160         <rdar://problem/7709452> Implement Default Ruby Overhang Behavior
2161         https://bugs.webkit.org/show_bug.cgi?id=49334
2162
2163         Tests: fast/ruby/overhang-horizontal.html
2164                fast/ruby/overhang-vertical.html
2165
2166         This is a first cut at ruby overhang. It allows ruby text to hang over other
2167         text of equal or smaller size. Two notable omissions are that max preferred
2168         width computation was not patched, so it will overshoot, and that overhang
2169         ignores the width of the adjoining text runs.
2170
2171         * rendering/RenderBlock.h:
2172         * rendering/RenderBlockLineLayout.cpp:
2173         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Adjust margins
2174         of ruby runs for overhang.
2175         (WebCore::RenderBlock::fitBelowFloats): Maintain the increase in line width to
2176         compensate for overhang.
2177         (WebCore::RenderBlock::findNextLineBreak): When encountering
2178         a ruby run, increase the line width to account for the fact that overhang will be
2179         collapsed.
2180         * rendering/RenderRubyRun.cpp:
2181         (WebCore::RenderRubyRun::getOverhang): Added. Allows ruby to overhang if
2182         the adjoining renderer is text with equal or smaller font size.
2183         * rendering/RenderRubyRun.h:
2184         (WebCore::toRenderRubyRun):
2185
2186 2011-04-04  David Kilzer  <ddkilzer@apple.com>
2187
2188         <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
2189
2190         Reviewed by Alexey Proskuryakov.
2191
2192         * WebCore.exp.in: Export wkSetHTTPPipeliningMaximumPriority().
2193         * platform/mac/WebCoreSystemInterface.h:
2194         (wkSetHTTPPipeliningMaximumPriority): Added function pointer
2195         declaration.
2196         * platform/mac/WebCoreSystemInterface.mm:
2197         (wkSetHTTPPipeliningMaximumPriority): Added function pointer.
2198         * platform/network/cf/ResourceRequestCFNet.cpp:
2199         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Call
2200         wkSetHTTPPipeliningMaximumPriority() to set the maximum HTTP
2201         pipelining priority.
2202         * platform/network/cf/ResourceRequestCFNet.h:
2203         (WebCore::toResourceLoadPriority): Renamed from
2204         mapHTTPPipeliningPriorityToResourceLoadPriority().  Updated to
2205         to handle Unresolved case.
2206         (WebCore::toHTTPPipeliningPriority): Renamed from
2207         mapResourceLoadPriorityToHTTPPipeliningPriority().  Updated to
2208         handle Unresolved case.
2209         * platform/network/mac/ResourceRequestMac.mm:
2210         (WebCore::ResourceRequest::doUpdateResourceRequest): Switched to
2211         use toResourceLoadPriority().
2212         (WebCore::ResourceRequest::doUpdatePlatformRequest): Switched to
2213         use toHTTPPipeliningPriority().  Moved
2214         shouldForceHTTPPipeliningPriorityHigh() check into the argument
2215         of toHTTPPipeliningPriority() instead of hard-coding a
2216         now-incorrect value.
2217
2218 2011-04-04  MORITA Hajime  <morrita@google.com>
2219
2220         Reviewed by Kent Tamura.
2221
2222         Convert <meter> shadow DOM to a DOM-based shadow.
2223         https://bugs.webkit.org/show_bug.cgi?id=50661
2224         
2225         Eliminated a large part of <meter> custom layout code,
2226         which is replaced by a shadow tree.
2227         Note that the shadow tree is created on construction time and
2228         will remain during the host HTMLMeterElement lifecycle.
2229         
2230         * Android.mk:
2231         * CMakeLists.txt:
2232         * GNUmakefile.am:
2233         * WebCore.gypi:
2234         * WebCore.pro:
2235         * WebCore.vcproj/WebCore.vcproj:
2236         * WebCore.xcodeproj/project.pbxproj:
2237         * css/CSSMutableStyleDeclaration.cpp:
2238         (WebCore::CSSMutableStyleDeclaration::setProperty):
2239         * css/CSSMutableStyleDeclaration.h:
2240         * css/CSSSelector.cpp:
2241         (WebCore::CSSSelector::pseudoId):
2242         (WebCore::nameToPseudoTypeMap):
2243         (WebCore::CSSSelector::extractPseudoType):
2244         * css/CSSSelector.h:
2245         * css/html.css:
2246         (meter):
2247         (meter::-webkit-meter-bar):
2248         (meter::-webkit-meter-optimum-value):
2249         (meter::-webkit-meter-suboptimum-value):
2250         (meter::-webkit-meter-even-less-good-value):
2251         * html/HTMLMeterElement.cpp:
2252         (WebCore::HTMLMeterElement::~HTMLMeterElement):
2253         (WebCore::HTMLMeterElement::parseMappedAttribute):
2254         (WebCore::HTMLMeterElement::attach):
2255         (WebCore::HTMLMeterElement::valueRatio):
2256         (WebCore::HTMLMeterElement::didElementStateChange):
2257         (WebCore::HTMLMeterElement::createShadowSubtree):
2258         * html/HTMLMeterElement.h:
2259         * html/shadow/MeterShadowElement.cpp: Added.
2260         (WebCore::MeterShadowElement::MeterShadowElement):        
2261         (WebCore::MeterShadowElement::meterElement):
2262         (WebCore::MeterShadowElement::rendererIsNeeded):
2263         (WebCore::MeterBarElement::shadowPseudoId):
2264         (WebCore::MeterValueElement::shadowPseudoId):
2265         (WebCore::MeterValueElement::setWidthPercentage):
2266         * html/shadow/MeterShadowElement.h: Added.
2267         (WebCore::MeterBarElement::MeterBarElement):
2268         (WebCore::MeterBarElement::create):
2269         (WebCore::MeterValueElement::MeterValueElement):
2270         (WebCore::MeterValueElement::create):
2271         * rendering/RenderMeter.cpp:
2272         (WebCore::RenderMeter::RenderMeter):
2273         (WebCore::RenderMeter::~RenderMeter):
2274         (WebCore::RenderMeter::valueRatio):
2275         * rendering/RenderMeter.h:
2276         (WebCore::RenderMeter::renderName):
2277         (WebCore::RenderMeter::isMeter):
2278         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2279         (WebCore::RenderMeter::canHaveChildren):
2280
2281 2011-04-04  Dimitri Glazkov  <dglazkov@chromium.org>
2282
2283         Reviewed by Adam Barth.
2284
2285         Introduce EventDispatchMediator abstraction, which encapsulate all
2286         non-trivial logic around firing a specific type of an event.
2287         https://bugs.webkit.org/show_bug.cgi?id=57562
2288
2289         Refactoring, covered by existing tests.
2290
2291         * dom/Event.cpp:
2292         (WebCore::EventDispatchMediator::EventDispatchMediator): Added.
2293         (WebCore::EventDispatchMediator::~EventDispatchMediator): Added.
2294         (WebCore::EventDispatchMediator::dispatchEvent): Added.
2295         (WebCore::EventDispatchMediator::event): Added.
2296         * dom/Event.h: Added decl.
2297         * dom/EventDispatcher.cpp:
2298         (WebCore::EventDispatcher::dispatchEvent): Changed to use EventDispatchMediator.
2299         * dom/EventDispatcher.h: Updated decls.
2300         * dom/KeyboardEvent.cpp:
2301         (WebCore::KeyboardEventDispatchMediator::KeyboardEventDispatchMediator): Added.
2302         (WebCore::KeyboardEventDispatchMediator::dispatchEvent): Added.
2303         * dom/KeyboardEvent.h: Updated decls
2304         * dom/Node.cpp:
2305         (WebCore::Node::dispatchEvent): Changed to use EventDispatchMediator.
2306         (WebCore::Node::dispatchKeyEvent): Changed to use KeyboardEventDispatchMediator.
2307
2308 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
2309
2310         Reviewed by Xan Lopez.
2311
2312         [Cairo] Memory leak in RefPtrCairo
2313         https://bugs.webkit.org/show_bug.cgi?id=57758
2314
2315         No new tests. This just fixes a memory leak.
2316
2317         * platform/graphics/cairo/RefPtrCairo.cpp:
2318         (WTF::derefIfNotNull): Deref should unref the cairo_font_fact_t, not reference it.
2319
2320 2011-04-04  Adrienne Walker  <enne@google.com>
2321
2322         Unreviewed, rolling out r82880.
2323         http://trac.webkit.org/changeset/82880
2324         https://bugs.webkit.org/show_bug.cgi?id=50661
2325
2326         Meter elements not rendered in Chromium Linux layout tests
2327
2328         * Android.mk:
2329         * CMakeLists.txt:
2330         * GNUmakefile.am:
2331         * WebCore.gypi:
2332         * WebCore.pro:
2333         * WebCore.vcproj/WebCore.vcproj:
2334         * WebCore.xcodeproj/project.pbxproj:
2335         * css/CSSMutableStyleDeclaration.cpp:
2336         * css/CSSMutableStyleDeclaration.h:
2337         * css/CSSSelector.cpp:
2338         (WebCore::CSSSelector::pseudoId):
2339         (WebCore::nameToPseudoTypeMap):
2340         (WebCore::CSSSelector::extractPseudoType):
2341         * css/CSSSelector.h:
2342         * css/html.css:
2343         (meter):
2344         (meter::-webkit-meter):
2345         (meter::-webkit-meter-bar):
2346         (meter::-webkit-meter-optimum-value):
2347         (meter::-webkit-meter-suboptimal-value):
2348         (meter::-webkit-meter-even-less-good-value):
2349         * html/HTMLMeterElement.cpp:
2350         (WebCore::HTMLMeterElement::create):
2351         (WebCore::HTMLMeterElement::parseMappedAttribute):
2352         (WebCore::HTMLMeterElement::attach):
2353         * html/HTMLMeterElement.h:
2354         * html/shadow/MeterShadowElement.cpp: Removed.
2355         * html/shadow/MeterShadowElement.h: Removed.
2356         * rendering/RenderMeter.cpp:
2357         (WebCore::RenderMeter::RenderMeter):
2358         (WebCore::RenderMeter::~RenderMeter):
2359         (WebCore::RenderMeter::createPart):
2360         (WebCore::RenderMeter::updateFromElement):
2361         (WebCore::RenderMeter::layoutParts):
2362         (WebCore::RenderMeter::styleDidChange):
2363         (WebCore::RenderMeter::shouldHaveParts):
2364         (WebCore::RenderMeter::valueRatio):
2365         (WebCore::RenderMeter::barPartRect):
2366         (WebCore::RenderMeter::valuePartRect):
2367         (WebCore::RenderMeter::valuePseudoId):
2368         (WebCore::RenderMeter::barPseudoId):
2369         (WebCore::RenderMeter::detachShadows):
2370         (WebCore::RenderMeter::updateShadows):
2371         * rendering/RenderMeter.h:
2372         (WebCore::RenderMeter::renderName):
2373         (WebCore::RenderMeter::isMeter):
2374         (WebCore::RenderMeter::shadowAttached):
2375
2376 2011-04-04  Chang Shu  <cshu@webkit.org>
2377
2378         Reviewed by Ryosuke Niwa.
2379
2380         setContentEditable with true/false/inherit string is not working properly
2381         https://bugs.webkit.org/show_bug.cgi?id=52058
2382
2383         Move isContentEditable from HTMLElement to Node. Thus, Node provides two functions for
2384         checking editability: rendererIsEditable and isContentEdiable. The former is a fast path,
2385         which does NOT trigger layout and only checks the render style of usermodify. The latter
2386         updates the layout first to make sure the render style syncs with DOM contenteditable 
2387         attribute. Certain call sites that need to call isContentEditable rather than rendererIsEditable
2388         are also updated in the patch. But a complete fix will follow up in bug 57244.
2389
2390         This patch fixes all the failed layout tests related to set contenteditable.
2391
2392         * accessibility/AccessibilityRenderObject.cpp:
2393         (WebCore::AccessibilityRenderObject::isReadOnly):
2394         * dom/Node.cpp:
2395         (WebCore::Node::isContentEditable):
2396         (WebCore::Node::shouldUseInputMethod):
2397         * dom/Node.h:
2398         * html/HTMLElement.cpp:
2399         * html/HTMLElement.h:
2400
2401 2011-04-04  Roland Steiner  <rolandsteiner@chromium.org>
2402
2403         Reviewed by Dimitri Glazkov.
2404
2405         Bug 57689 - Extract scoping functionality from Document
2406         https://bugs.webkit.org/show_bug.cgi?id=57689
2407
2408         Moved selfOnlyRef (renamed to guardRef), element ID, image map
2409         and accesss key functionalities from Document to a new base
2410         class TreeScope.
2411
2412         TreeShared: made removedLastRef protected
2413
2414         No new tests. (refactoring)
2415
2416         * Android.mk:
2417         * CMakeLists.txt:
2418         * GNUmakefile.am:
2419         * WebCore.gypi:
2420         * WebCore.pro:
2421         * WebCore.vcproj/WebCore.vcproj:
2422         * WebCore.xcodeproj/project.pbxproj:
2423         * dom/Document.cpp:
2424         (WebCore::Document::Document):
2425         (WebCore::Document::destroyScope):
2426         (WebCore::Document::getElementById):
2427         (WebCore::Document::childrenChanged):
2428         (WebCore::Document::scheduleStyleRecalc):
2429         (WebCore::Document::attach):
2430         (WebCore::Document::detach):
2431         * dom/Document.h:
2432         (WebCore::Node::Node):
2433         * dom/DocumentOrderedMap.cpp:
2434         (WebCore::DocumentOrderedMap::get):
2435         (WebCore::DocumentOrderedMap::getElementById):
2436         (WebCore::DocumentOrderedMap::getElementByMapName):
2437         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
2438         * dom/DocumentOrderedMap.h:
2439         * dom/DOMAllInOne.cpp:
2440         * dom/Node.cpp:
2441         (WebCore::Node::~Node):
2442         (WebCore::Node::setDocument):
2443         * dom/Node.h:
2444         * dom/TreeScope.cpp: Added.
2445         * dom/TreeScope.h: Added.
2446         * platform/TreeShared.h:
2447         (WebCore::TreeShared::removedLastRef): made protected
2448
2449 2011-04-04  MORITA Hajime  <morrita@google.com>
2450
2451         Reviewed by Dimitri Glazkov.
2452
2453         Convert <meter> shadow DOM to a DOM-based shadow.
2454         https://bugs.webkit.org/show_bug.cgi?id=50661
2455         
2456         Eliminated a large part of <meter> custom layout code,
2457         which is replaced by a shadow tree.
2458         Note that the shadow tree is created on construction time and
2459         will remain during the host HTMLMeterElement lifecycle.
2460         
2461         * Android.mk:
2462         * CMakeLists.txt:
2463         * GNUmakefile.am:
2464         * WebCore.gypi:
2465         * WebCore.pro:
2466         * WebCore.vcproj/WebCore.vcproj:
2467         * WebCore.xcodeproj/project.pbxproj:
2468         * css/CSSMutableStyleDeclaration.cpp:
2469         (WebCore::CSSMutableStyleDeclaration::setProperty):
2470         * css/CSSMutableStyleDeclaration.h:
2471         * css/CSSSelector.cpp:
2472         (WebCore::CSSSelector::pseudoId):
2473         (WebCore::nameToPseudoTypeMap):
2474         (WebCore::CSSSelector::extractPseudoType):
2475         * css/CSSSelector.h:
2476         * css/html.css:
2477         (meter):
2478         (meter::-webkit-meter-bar):
2479         (meter::-webkit-meter-optimum-value):
2480         (meter::-webkit-meter-suboptimum-value):
2481         (meter::-webkit-meter-even-less-good-value):
2482         * html/HTMLMeterElement.cpp:
2483         (WebCore::HTMLMeterElement::~HTMLMeterElement):
2484         (WebCore::HTMLMeterElement::parseMappedAttribute):
2485         (WebCore::HTMLMeterElement::attach):
2486         (WebCore::HTMLMeterElement::valueRatio):
2487         (WebCore::HTMLMeterElement::didElementStateChange):
2488         (WebCore::HTMLMeterElement::createShadowSubtree):
2489         * html/HTMLMeterElement.h:
2490         * html/shadow/MeterShadowElement.cpp: Added.
2491         (WebCore::MeterShadowElement::MeterShadowElement):        
2492         (WebCore::MeterShadowElement::meterElement):
2493         (WebCore::MeterShadowElement::rendererIsNeeded):
2494         (WebCore::MeterBarElement::shadowPseudoId):
2495         (WebCore::MeterValueElement::shadowPseudoId):
2496         (WebCore::MeterValueElement::setWidthPercentage):
2497         * html/shadow/MeterShadowElement.h: Added.
2498         (WebCore::MeterBarElement::MeterBarElement):
2499         (WebCore::MeterBarElement::create):
2500         (WebCore::MeterValueElement::MeterValueElement):
2501         (WebCore::MeterValueElement::create):
2502         * rendering/RenderMeter.cpp:
2503         (WebCore::RenderMeter::RenderMeter):
2504         (WebCore::RenderMeter::~RenderMeter):
2505         (WebCore::RenderMeter::valueRatio):
2506         * rendering/RenderMeter.h:
2507         (WebCore::RenderMeter::renderName):
2508         (WebCore::RenderMeter::isMeter):
2509         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2510         (WebCore::RenderMeter::canHaveChildren):
2511
2512 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
2513
2514         Reviewed by Gustavo Noronha Silva.
2515
2516         [GTK] WebGL support
2517         https://bugs.webkit.org/show_bug.cgi?id=31517
2518
2519         Add WebGL support for the GTK+ bits of WebCore.
2520
2521         No new tests. This will be covered by the existing WebGL tests once
2522         the bots are capable of running WebGL tests.
2523
2524         * GNUmakefile.am: Added new files required for WebGL support.
2525         * html/HTMLCanvasElement.cpp:
2526         (WebCore::HTMLCanvasElement::getContext): Extend #ifdef to cover GTK+ as well, which does not
2527         yet support accelerated compositing.
2528         * platform/graphics/ANGLEWebKitBridge.h: Update to reflect the fact that ANGLE isn't compiled as
2529         a framework for GTK+.
2530         * platform/graphics/GraphicsContext3D.h:
2531         (WebCore::GraphicsContext3D::platformTexture): Added a declaration of this method for Cairo.
2532         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): Ditto.
2533         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Added.
2534         (WebCore::GraphicsContext3D::getImageData): Added.
2535         (WebCore::GraphicsContext3D::paintToCanvas): Added.
2536         * platform/graphics/cairo/OpenGLShims.cpp: Added. This file controls loading of GL extension
2537         functions dynamically. They have different names across the different vendors' GL implementations.
2538         (WebCore::lookupOpenGLFunctionAddress): Added
2539         (WebCore::openGLFunctionTable): Added
2540         (WebCore::initializeOpenGLShims): Added
2541         * platform/graphics/cairo/OpenGLShims.h: Added.
2542         * platform/graphics/gtk/DrawingBufferGtk.cpp: Added.
2543         (WebCore::DrawingBuffer::DrawingBuffer): Very generic implementation for Cairo.
2544         (WebCore::DrawingBuffer::~DrawingBuffer): Ditto.
2545         (WebCore::DrawingBuffer::didReset): Ditto.
2546         (WebCore::DrawingBuffer::platformColorBuffer): Ditto.
2547         * platform/graphics/gtk/GraphicsContext3DGtk.cpp: Added.
2548         (WebCore::GraphicsContext3D::create): Initial implementation.
2549         (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
2550         (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
2551         (WebCore::GraphicsContext3D::makeContextCurrent): Ditto.
2552         (WebCore::GraphicsContext3D::platformGraphicsContext3D): Ditto.
2553         (WebCore::GraphicsContext3D::isGLES2Compliant): Ditto.
2554         * platform/graphics/gtk/GraphicsContext3DInternal.cpp: Added.
2555         (sharedDisplay): Added this shared display which is required by some
2556         display drivers.
2557         (WebCore::activeGraphicsContexts): This method keeps track of all active GraphicsContext3D
2558         contexts, in order to clean them up at exit. This prevents crashes on certain OpenGL drivers.
2559         (WebCore::GraphicsContext3DInternal::addActiveGraphicsContext): Ditto.
2560         (WebCore::GraphicsContext3DInternal::removeActiveGraphicsContext): Ditto.
2561         (WebCore::GraphicsContext3DInternal::cleanupActiveContextsAtExit): Ditto.
2562         (WebCore::GraphicsContext3DInternal::create): Figure out the best way to create an OpenGL
2563         context given the current environment.
2564         (WebCore::GraphicsContext3DInternal::createPbufferContext): Pbuffer context initializer.
2565         (WebCore::GraphicsContext3DInternal::createPixmapContext): Pixmap context initializer.
2566         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): Initial implementation.
2567         (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): Ditto.
2568         (WebCore::GraphicsContext3DInternal::makeContextCurrent): Ditto.
2569         * platform/graphics/gtk/GraphicsContext3DInternal.h: Added.
2570         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added generic implementation.
2571         (WebCore::Extensions3DOpenGL::ensureEnabled): Ditto.
2572         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2573         (WebCore::GraphicsContext3D::reshape): Test for the context using the public API rather than
2574         the private bits that are specific to the Apple port.
2575
2576 2011-04-04  Alexey Proskuryakov  <ap@apple.com>
2577
2578         Reviewed by Dan Bernstein.
2579
2580         REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
2581         https://bugs.webkit.org/show_bug.cgi?id=51230
2582         <rdar://problem/8780989>
2583
2584         <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
2585
2586         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Moved Caps Lock handling from
2587         WebKits to WebCore, because WebKit shouldn't be smart.
2588
2589 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
2590
2591         Fix Windows build warning.
2592
2593         * WebCore.vcproj/WebCore.vcproj: Exclude EventQueue.cpp in Debug_All build.
2594
2595 2011-04-04  Adam Roben  <aroben@apple.com>
2596
2597         Attempted Mac build fix, part III
2598
2599         * WebCore.exp.in: Export PlatformCALayer::setGeometryFlipped. Also resorted some symbols.
2600
2601 2011-04-04  Andy Estes  <aestes@apple.com>
2602
2603         Fix the Mac build.
2604
2605         * WebCore.exp.in:
2606
2607 2011-04-04  David Dorwin  <ddorwin@chromium.org>
2608
2609         Reviewed by David Levin.
2610
2611         Chromium Mac crashes when entering fullscreen
2612         https://bugs.webkit.org/show_bug.cgi?id=57483
2613
2614         Override extraFullScreenStyleSheet in RenderThemeChromiumMac to avoid hitting the ASSERT_NOT_REACHED in RenderThemeMac.
2615
2616         * WebCore.gyp/WebCore.gyp:
2617         * rendering/RenderThemeChromiumMac.h:
2618         * rendering/RenderThemeChromiumMac.mm:
2619         (WebCore::RenderThemeChromiumMac::extraFullScreenStyleSheet):
2620
2621 2011-04-04  Adam Roben  <aroben@apple.com>
2622
2623         Attempted Mac build fix, part II
2624
2625         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayerClient.h and
2626         PlatformCAAnimation.h as private so that WebKit2 can #include them (transitively).
2627
2628 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
2629
2630         Reviewed by Adam Roben.
2631
2632         Remove unused AnalyzeWithLargeStack code from Windows build files
2633         https://bugs.webkit.org/show_bug.cgi?id=57771
2634         
2635         This was used for us to build with prefast automatically,
2636         but it is out-of-date and hasn't been used for some time.
2637         Removing completely for now.
2638
2639         * WebCore.vcproj/WebCore.vcproj:
2640         * WebCore.vcproj/WebCorePreBuild.cmd:
2641
2642 2011-04-01  Matthew Delaney  <mdelaney@apple.com>
2643
2644         Reviewed by Simon Fraser.
2645
2646         [CG] Do not accelerate small canvases
2647         https://bugs.webkit.org/show_bug.cgi?id=57596
2648
2649         No new tests. No outward behavior changes.
2650
2651         * platform/graphics/cg/ImageBufferCG.cpp:
2652
2653 2011-04-04  Adam Roben  <aroben@apple.com>
2654
2655         Attempted Mac build fix
2656
2657         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayer.h and GraphicsLayerCA.h private
2658         so that WebKit can #include them.
2659
2660 2011-04-04  Malcolm MacLeod  <mmacleod@webmail.co.za>
2661
2662         Reviewed by Kevin Ollivier.
2663
2664         [wx] Implement support for temporary files.
2665         
2666         https://bugs.webkit.org/show_bug.cgi?id=57772
2667
2668         * platform/FileSystem.h:
2669         * platform/wx/FileSystemWx.cpp:
2670         (WebCore::getFileModificationTime):
2671         (WebCore::openTemporaryFile):
2672         (WebCore::closeFile):
2673         (WebCore::writeToFile):
2674
2675 2011-04-01  Oliver Hunt  <oliver@apple.com>
2676
2677         Reviewed by Geoffrey Garen.
2678
2679         Make StructureChain GC allocated
2680         https://bugs.webkit.org/show_bug.cgi?id=56695
2681
2682         Update for new Structure marking function
2683
2684         * bindings/js/JSDOMGlobalObject.cpp:
2685         (WebCore::JSDOMGlobalObject::markChildren):
2686
2687 2011-04-04  Pavel Feldman  <pfeldman@google.com>
2688
2689         Reviewed by Yury Semikhatsky.
2690
2691         Web Inspector: add support for the enumerated types in the protocol.
2692         https://bugs.webkit.org/show_bug.cgi?id=57761
2693
2694         * inspector/Inspector.json:
2695         * inspector/InspectorDebuggerAgent.cpp:
2696         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
2697         * inspector/InspectorDebuggerAgent.h:
2698         * inspector/InspectorInstrumentation.cpp:
2699         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
2700         (WebCore::InspectorInstrumentation::scriptImportedImpl):
2701         * inspector/InspectorResourceAgent.cpp:
2702         (WebCore::cachedResourceTypeString):
2703         (WebCore::InspectorResourceAgent::didReceiveResponse):
2704         (WebCore::InspectorResourceAgent::setInitialScriptContent):
2705         (WebCore::InspectorResourceAgent::setInitialXHRContent):
2706         * inspector/InspectorResourceAgent.h:
2707         * inspector/front-end/ScriptsPanel.js:
2708         * inspector/generate-inspector-idl:
2709
2710 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
2711
2712         Reviewed by Pavel Feldman.
2713
2714         Web Inspector: InspectorRuntimeAgent should not depend on Page
2715         https://bugs.webkit.org/show_bug.cgi?id=57759
2716
2717         Descendants of InspectorRuntimeAgent should implement a method providing access to the default
2718         inspected state used for console evaluations.
2719
2720         * inspector/InspectorAgent.cpp:
2721         (WebCore::InspectorAgent::InspectorAgent): runtime agent is created and deleted along with other agents.
2722         (WebCore::InspectorAgent::setFrontend):
2723         * inspector/InspectorAgent.h:
2724         * inspector/InspectorRuntimeAgent.cpp:
2725         (WebCore::InspectorRuntimeAgent::create):
2726         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2727         (WebCore::InspectorRuntimeAgent::evaluate):
2728         * inspector/InspectorRuntimeAgent.h:
2729         (WebCore::InspectorRuntimeAgent::InspectedStateProvider::~InspectedStateProvider):
2730
2731 2011-04-04  Yong Li  <yoli@rim.com>
2732
2733         Reviewed by Antonio Gomes.
2734
2735         https://bugs.webkit.org/show_bug.cgi?id=55969
2736         Fix the issue that document state is not saved when
2737         going backward and ending up with error page.
2738
2739         Test: platform/qt/fast/history/back-to-unreachable-url-then-forward.html
2740
2741         (For manual test, load a non-existent html first, then load
2742         fast/history/resources/check-scroll-position.html, then go
2743         back and go forward. If it doesn't show "SUCCESS" at the bottom
2744         of the page, your browser has failed the test)
2745
2746         * loader/FrameLoader.cpp:
2747         (WebCore::FrameLoader::load):
2748
2749 2011-04-04  Sergio Villar Senin  <svillar@igalia.com>
2750
2751         Reviewed by Martin Robinson.
2752
2753         [GTK] Fix make distcheck for 1.4.0
2754         https://bugs.webkit.org/show_bug.cgi?id=57750
2755
2756         Added a missing header file to the Makefile
2757
2758         * GNUmakefile.am:
2759
2760 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
2761
2762         Reviewed by Xan Lopez.
2763
2764         [GTK] http/tests/plugins/post-url-file.html fails on GTK+
2765         https://bugs.webkit.org/show_bug.cgi?id=55826
2766
2767         Correct the implementation of handlePostReadFile which uses GIO APIs and
2768         actually resizes the buffer to fit the entire size of the file data. This
2769         was likely leading to memory corruption until now.
2770
2771         * plugins/gtk/PluginViewGtk.cpp:
2772         (WebCore::PluginView::handlePostReadFile): Fix this method.
2773
2774 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
2775
2776         Reviewed by Yury Semikhatsky.
2777
2778         Web Inspector: [Extensions API] add notifications on panels shown/hidden
2779         https://bugs.webkit.org/show_bug.cgi?id=57752
2780
2781         * inspector/front-end/ExtensionAPI.js:
2782         (WebInspector.injectedExtensionAPI.PanelImpl):
2783         * inspector/front-end/ExtensionServer.js:
2784         (WebInspector.ExtensionServer.prototype.notifyPanelShown):
2785         (WebInspector.ExtensionServer.prototype.notifyPanelHidden):
2786         * inspector/front-end/Panel.js:
2787         (WebInspector.Panel.prototype.show):
2788         (WebInspector.Panel.prototype.hide):
2789
2790 2011-04-04  Pavel Podivilov  <podivilov@chromium.org>
2791
2792         Reviewed by Yury Semikhatsky.
2793
2794         Web Inspector: search in resources panel is broken.
2795         https://bugs.webkit.org/show_bug.cgi?id=57631
2796
2797         Search in resources panel should trigger source frame content load.
2798
2799         * inspector/front-end/Panel.js:
2800         (WebInspector.Panel.prototype.jumpToNextSearchResult):
2801         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
2802         * inspector/front-end/ResourcesPanel.js:
2803         * inspector/front-end/SearchController.js:
2804         (WebInspector.SearchController.prototype.handleShortcut):
2805         (WebInspector.SearchController.prototype.focusSearchField):
2806         * inspector/front-end/SourceFrame.js:
2807         (WebInspector.SourceFrame.prototype.show):
2808         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
2809         (WebInspector.SourceFrame.prototype.performSearch):
2810
2811 2011-04-03  Eric Seidel  <eric@webkit.org>
2812
2813         Reviewed by Ryosuke Niwa.
2814
2815         Split out UnicodeBidi enum into its own header (to allow use in platform)
2816         https://bugs.webkit.org/show_bug.cgi?id=57722
2817
2818         unicode-bidi is a CSS concept.  However the same concept is really needed throughout
2819         the bidi code in platform as well.  So I'm moving the enum to platform.
2820         The only part of the enum which doesn't make much sense to platform/ is "normal".
2821
2822         * WebCore.xcodeproj/project.pbxproj:
2823         * css/CSSPrimitiveValueMappings.h:
2824         * platform/text/UnicodeBidi.h: Added.
2825         * rendering/style/RenderStyle.h:
2826         * rendering/style/RenderStyleConstants.h:
2827
2828 2011-04-04  Andrey Adaikin  <aandrey@google.com>
2829
2830         Reviewed by Yury Semikhatsky.
2831
2832         Web Inspector: Highlighted search tokens would not be shown on long lines in the text viewer
2833         https://bugs.webkit.org/show_bug.cgi?id=57749
2834
2835         * inspector/front-end/TextViewer.js:
2836         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
2837         (WebInspector.TextEditorMainPanel.prototype._paintLine):
2838
2839 2011-04-04  Alexander Pavlov  <apavlov@chromium.org>
2840
2841         Reviewed by Yury Semikhatsky.
2842
2843         Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s
2844         https://bugs.webkit.org/show_bug.cgi?id=48525
2845
2846         * inspector/front-end/Resource.js:
2847         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
2848
2849 2011-04-01  Alexander Pavlov  <apavlov@chromium.org>
2850
2851         Reviewed by Yury Semikhatsky.
2852
2853         Web Inspector: appropriateSelectorForNode() invokes the "localName" getter on DOMNode rather than function
2854         https://bugs.webkit.org/show_bug.cgi?id=57632
2855
2856         Moved the affected method onto the DOMNode.prototype as "appropriateSelectorFor".
2857
2858         * inspector/front-end/DOMAgent.js:
2859         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
2860         * inspector/front-end/EventListenersSidebarPane.js:
2861         ():
2862         * inspector/front-end/StylesSidebarPane.js:
2863         (WebInspector.StylesSidebarPane.prototype.addBlankSection):
2864         * inspector/front-end/utilities.js:
2865
2866 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
2867
2868         Unreviewed. Followup to an incomplete commit in r82806.
2869
2870         * inspector/front-end/ExtensionAPI.js:
2871         (WebInspector.injectedExtensionAPI.PanelWithSidebarImpl.prototype.createSidebarPane):
2872         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl):
2873         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setHeight):
2874         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
2875         (WebInspector.injectedExtensionAPI):
2876         * inspector/front-end/ExtensionPanel.js:
2877         (WebInspector.ExtensionSidebarPane):
2878         (WebInspector.ExtensionSidebarPane.prototype.setPage):
2879         (WebInspector.ExtensionSidebarPane.prototype._setObject):
2880         * inspector/front-end/ExtensionServer.js:
2881         (WebInspector.ExtensionServer):
2882         (WebInspector.ExtensionServer.prototype.notifyExtensionSidebarUpdated):
2883         (WebInspector.ExtensionServer.prototype._onCreatePanel):
2884         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
2885         (WebInspector.ExtensionServer.prototype.createClientIframe):
2886         (WebInspector.ExtensionServer.prototype._onSetSidebarContent):
2887
2888 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
2889
2890         Unreviewed. Fix Qt minimal build.
2891
2892         * inspector/InspectorFrontendChannel.h:
2893
2894 2011-04-01  Sergey Vorobyev  <sergeyvorobyev@google.com>
2895
2896         Reviewed by Yury Semikhatsky.
2897
2898         Web Inspector: Separate sendMessageToFrontend function
2899         from InspectorClient to individual interface.
2900         https://bugs.webkit.org/show_bug.cgi?id=57548
2901
2902         Refactoring - covered with existing inspector tests.
2903
2904         * GNUmakefile.am:
2905         * WebCore.gypi:
2906         * WebCore.vcproj/WebCore.vcproj:
2907         * WebCore.xcodeproj/project.pbxproj:
2908         * inspector/CodeGeneratorInspector.pm:
2909         * inspector/InspectorClient.h:
2910         * inspector/InspectorFrontendChannel.h: Added.
2911         (WebCore::InspectorFrontendChannel::~InspectorFrontendChannel):
2912
2913 2011-04-04  Nico Weber  <thakis@chromium.org>
2914
2915         Reviewed by Eric Seidel.
2916
2917         Prefer a using directive over qualified names in LocalizedNumberICU.cpp
2918         https://bugs.webkit.org/show_bug.cgi?id=57742
2919
2920         Requested by ap in https://bugs.webkit.org/show_bug.cgi?id=57715
2921
2922         * platform/text/LocalizedNumberICU.cpp:
2923         (WebCore::createFormatterForCurrentLocale):
2924         (WebCore::numberFormatter):
2925         (WebCore::parseLocalizedNumber):
2926         (WebCore::formatLocalizedNumber):
2927
2928 2011-04-04  Andrey Adaikin  <aandrey@google.com>
2929
2930         Reviewed by Yury Semikhatsky.
2931
2932         Web Inspector: Breakpoints in the gutter stay static while editing the text
2933         https://bugs.webkit.org/show_bug.cgi?id=57616
2934
2935         * inspector/front-end/SourceFrame.js:
2936         (WebInspector.SourceFrame):
2937         (WebInspector.SourceFrame.prototype._saveViewerState):
2938         (WebInspector.SourceFrame.prototype._restoreViewerState):
2939         (WebInspector.SourceFrame.prototype._endEditing):
2940         (WebInspector.SourceFrame.prototype._lineNumberAfterEditing):
2941         (WebInspector.SourceFrame.prototype.addBreakpoint):
2942         (WebInspector.SourceFrame.prototype.removeBreakpoint):
2943         * inspector/front-end/TextViewer.js:
2944         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
2945         (WebInspector):
2946         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
2947         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
2948         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
2949         (WebInspector.TextEditorMainPanel.prototype._splitChunkOnALine):
2950
2951 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
2952
2953         Reviewed by Yury Semikhatsky.
2954
2955         Web Inspector: remove obsolete doc generating code from CodeGenerator.
2956         https://bugs.webkit.org/show_bug.cgi?id=57748
2957
2958         * inspector/CodeGeneratorInspector.pm:
2959
2960 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
2961
2962         Reviewed by Yury Semikhatsky.
2963
2964         Web Inspector: [Extensions API] Merge WatchExpressionSidebarPane into ExtensionSidebarPane
2965         https://bugs.webkit.org/show_bug.cgi?id=57622
2966
2967         Merged WatchExpressionSidebarPane into ExtensionSidebarPane, added setPage(url).
2968         Fixed wrong getter in schema (scripts -> elements)
2969
2970         * inspector/front-end/ExtensionAPI.js:
2971         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setObject):
2972         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setPage):
2973         * inspector/front-end/ExtensionAPISchema.json:
2974         * inspector/front-end/ExtensionServer.js:
2975         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
2976
2977 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
2978
2979         Reviewed by Pavel Feldman.
2980
2981         Web Inspector: introduce support of 'optional' flag for command arguments.
2982         https://bugs.webkit.org/show_bug.cgi?id=57698
2983
2984         * inspector/CodeGeneratorInspector.pm:
2985         * inspector/Inspector.json:
2986         * inspector/InspectorDebuggerAgent.cpp:
2987         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2988         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2989         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2990         * inspector/InspectorDebuggerAgent.h:
2991         * inspector/InspectorPageAgent.cpp:
2992         (WebCore::InspectorPageAgent::reloadPage):
2993         * inspector/InspectorPageAgent.h:
2994         * inspector/InspectorResourceAgent.cpp:
2995         (WebCore::InspectorResourceAgent::getResourceContent):
2996         * inspector/InspectorResourceAgent.h:
2997         * inspector/InspectorRuntimeAgent.cpp:
2998         (WebCore::InspectorRuntimeAgent::evaluate):
2999         * inspector/InspectorRuntimeAgent.h:
3000         * inspector/generate-inspector-idl:
3001
3002 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
3003
3004         Reviewed by Pavel Feldman.
3005
3006         Web Inspector: InjectedScriptManager should not try to access inspected window in case of workers
3007         https://bugs.webkit.org/show_bug.cgi?id=57637
3008
3009         * bindings/js/JSInjectedScriptManager.cpp:
3010         (WebCore::InjectedScriptManager::injectedScriptFor):
3011         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3012         (WebCore::InjectedScriptManager::injectedScriptFor):
3013         * inspector/InjectedScript.cpp:
3014         (WebCore::InjectedScript::InjectedScript):
3015         (WebCore::InjectedScript::canAccessInspectedWindow):
3016         * inspector/InjectedScript.h:
3017         * inspector/InjectedScriptManager.cpp:
3018         (WebCore::InjectedScriptManager::createForPage):
3019         (WebCore::InjectedScriptManager::createForWorker):
3020         (WebCore::InjectedScriptManager::InjectedScriptManager): access check function is passed as a parameter to the constructor
3021         and it depends on which type of context we're inspecting(worker or page).
3022         (WebCore::InjectedScriptManager::canAccessInspectedWorkerContext):
3023         * inspector/InjectedScriptManager.h:
3024         * inspector/InspectorController.cpp:
3025         (WebCore::InspectorController::InspectorController):
3026
3027 2011-04-04  Ryuan Choi  <ryuan.choi@samsung.com>
3028
3029         Reviewed by Eric Seidel.
3030
3031         V8StringCallback.cpp requires V8Binding.h
3032         https://bugs.webkit.org/show_bug.cgi?id=57699
3033
3034         No new tests required because of just adding header file.
3035
3036         * bindings/scripts/CodeGeneratorV8.pm:
3037
3038 2011-04-03  Ryuan Choi  <ryuan.choi@samsung.com>
3039
3040         Reviewed by Eric Seidel.
3041
3042         [CMAKE] Clean duplicated files in WebCore_Sources
3043         https://bugs.webkit.org/show_bug.cgi?id=57741
3044
3045         No new tests, Only duplicated files were removed.
3046
3047         * CMakeLists.txt:
3048
3049 2011-04-03  Luke Macpherson   <macpherson@chromium.org>
3050
3051         Reviewed by Darin Adler.
3052
3053         Fix 2-space indentation introduced in bug 54706.
3054         https://bugs.webkit.org/show_bug.cgi?id=57740
3055
3056         No new tests - whitespace changes only.
3057
3058         * css/CSSStyleSelector.cpp:
3059         (WebCore::CSSStyleSelector::applyProperty):
3060         Convert 2-space indentation to 4-space indentation.
3061
3062 2011-04-03  Luke Macpherson   <macpherson@chromium.org>
3063
3064         Reviewed by Dimitri Glazkov.
3065
3066         Make CSSStyleApplyProperty non-copyable
3067         https://bugs.webkit.org/show_bug.cgi?id=57738
3068
3069         No new functionality added so no new tests required.
3070
3071         * css/CSSStyleApplyProperty.h:
3072         Added WTF_MAKE_NONCOPYABLE(CSSStyleApplyProperty) to ensure singleton stays single.
3073
3074 2011-04-03  Dan Bernstein  <mitz@apple.com>
3075
3076         Reviewed by Maciej Stachowiak.
3077
3078         fast/images/extra-image-in-image-document.html crashes when run after embed-image.html
3079         https://bugs.webkit.org/show_bug.cgi?id=57733
3080
3081         The crash happens because resetting the page scale as part of preparing the WebView for the
3082         next test triggered layout, which in turn caused a plug-in to make a resource request, and
3083         DumpRenderTree's delegate to be dispatched. The delegate doesn’t expect to be called between
3084         tests, and it references the layout test controller, which is null.
3085
3086         * page/Frame.cpp:
3087         (WebCore::Frame::scalePage): Avoid an unnecessary layout if the page scale isn’t changing. This
3088         is more efficient, and has the side effect of avoiding the crash in DumpRenderTree, although
3089         DumpRenderTree could still crash when after a test with disabled plug-ins and a non-1 page scale.
3090         I think there are currently no such tests, so I am not fixing DumpRenderTree.
3091
3092 2011-04-03  Eric Seidel  <eric@webkit.org>
3093
3094         Reviewed by Ryosuke Niwa.
3095
3096         Teach InlineIterator how to work from any root, not just a RenderBlock
3097         https://bugs.webkit.org/show_bug.cgi?id=57726
3098
3099         For implementing bidi-unicode: isolate, we need to be able to run the
3100         bidi algorithm over a subtree of inlines, not just from a block root.
3101         This is the first step in making this possible.
3102
3103         * rendering/InlineIterator.h:
3104         (WebCore::InlineIterator::InlineIterator):
3105         (WebCore::InlineIterator::root):
3106         (WebCore::bidiNext):
3107         (WebCore::bidiFirst):
3108         (WebCore::InlineIterator::increment):
3109         (WebCore::InlineBidiResolver::appendRun):
3110         * rendering/RenderBlockLineLayout.cpp:
3111         (WebCore::RenderBlock::findNextLineBreak):
3112
3113 2011-04-03  Eric Seidel  <eric@webkit.org>
3114
3115         Reviewed by Dan Bernstein.
3116
3117         Split out handling of trailing spaces from layoutInlineChildren
3118         https://bugs.webkit.org/show_bug.cgi?id=57432
3119
3120         There is much more we could split out from this function, but this is a start.
3121
3122         I suspect this is very hot code.  Hopefully the compiler will do the right thing.
3123         If it doesn't the Chromium PLT bots will tell us.
3124
3125         * rendering/RenderBlock.h:
3126         * rendering/RenderBlockLineLayout.cpp:
3127         (WebCore::RenderBlock::handleTrailingSpaces):
3128         (WebCore::RenderBlock::layoutInlineChildren):
3129
3130 2011-03-21  Ryosuke Niwa  <rniwa@webkit.org>
3131
3132         Reviewed by Eric Seidel.
3133
3134         editing commands shouldn't run when there's no body
3135         https://bugs.webkit.org/show_bug.cgi?id=56771
3136
3137         The bug was caused by WebKit's not checking the existence of root editable element
3138         in enabled* functions. Although isContentEditable returns true whenever we're in design mode,
3139         we should not run editing commands in a document without a body element editable because
3140         doing so results in appending a non-body element to the document node.
3141
3142         Fixed the bug by modifying various enabled* functions to ensure we have a root editable element.
3143         New behavior tries to match that of Firefox except StyleWithCSS, which Firefox seems to ignore
3144         when there are no body element. Since StyleWithCSS is a document's state or property, we allow
3145         execCommand('StyleWithCSS') even in a document without a body element.
3146
3147         WebKit's and Firefox's behaviors also deviate in insert-image-with-selecting-document.html.
3148         Whereas WebKit respects selection set by script and ignores execCommand, Firefox modifies
3149         the selection when document.write("x") is ran and successfully inserts image.
3150
3151         Thus, empty-document-delete.html and empty-document-justify-right.html both pass on Firefox
3152         while empty-document-stylewithcss.html and insert-image-with-selecting-document.html both fail.
3153
3154         Since Internet Explorer does not allow execCommand to run under design mode properly, we could
3155         not test its behavior.
3156
3157         Tests: editing/editability/empty-document-delete.html
3158                editing/editability/empty-document-justify-right.html
3159                editing/editability/empty-document-stylewithcss.html
3160                editing/execCommand/insert-image-with-selecting-document.html
3161
3162         * editing/Editor.cpp:
3163         (WebCore::Editor::canEdit): Verify that the root editable element exists
3164         instead of just checking that selection endpoints are editable because
3165         selection endpoints could be document node without a body element in design mode
3166         and we don't want to consider such a document editable.
3167         (WebCore::Editor::canDelete): Ditto.
3168         * editing/EditorCommand.cpp:
3169         (WebCore::enabledInEditableText): Ditto.
3170         (WebCore::enabledInRichlyEditableText): Ditto.
3171         (WebCore::enabledDelete): Call enabledCut and enabledInEditableText instead
3172         of duplicating the code in order to fix the same bug.
3173
3174 2011-04-02  Dan Bernstein  <mitz@apple.com>
3175
3176         Reviewed by Maciej Stachowiak.
3177
3178         REGRESSION (r82786): Media controls render incorrectly on GTK and Qt
3179         https://bugs.webkit.org/show_bug.cgi?id=57719
3180
3181         r82786 exposed an incorrect assumption inRenderMediaControlTimeDisplay::layout()
3182         that the timeline container is the parent of the time display. This is not true
3183         with the GTK media style, where the current time display is an inline box, and
3184         thus wrapped in an anonymous flexible box. The code was incorrectly considering
3185         the width of the anonymous box and deciding to hide the time display. Prior to
3186         r82786, this mistake was corrected by the call to computeLogicalWidth() in line layout.
3187
3188         * rendering/MediaControlElements.cpp:
3189         (WebCore::RenderMediaControlTimeDisplay::layout): Changed to skip past anonymous ancestors.
3190
3191 2011-04-02  Nico Weber  <thakis@chromium.org>
3192
3193         Reviewed by Adam Barth.
3194
3195         Explicitly use icu namespace for ports building with U_USING_ICU_NAMESPACE=0
3196
3197         By default, ICU includes |using namespace icu;| in its header files
3198         for backwards compatibility. Clients can define
3199         U_USING_ICU_NAMESPACE=0 to tell ICU to not do this. Prefixing all ICU
3200         classes with |icu::| makes this file compile no matter what
3201         U_USING_ICU_NAMESPACE is set to.
3202
3203         https://bugs.webkit.org/show_bug.cgi?id=57715
3204
3205         * platform/text/LocalizedNumberICU.cpp:
3206         (WebCore::createFormatterForCurrentLocale):
3207         (WebCore::numberFormatter):
3208         (WebCore::parseLocalizedNumber):
3209         (WebCore::formatLocalizedNumber):
3210
3211 2011-04-02  Dan Bernstein  <mitz@apple.com>
3212
3213         Reviewed by Dave Hyatt.
3214
3215         Remove an unnecessary extra computeLogicalWidth() from line layout
3216         https://bugs.webkit.org/show_bug.cgi?id=57711
3217
3218         Changes in behavior (MathML progression) covered by existing layout tests.
3219
3220         * rendering/RenderBlockLineLayout.cpp:
3221         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
3222         call to computeLogicalWidth(). Because of <http://webkit.org/b/57700>, this
3223         actually prevents MathML rows from reverting to an incorrect width.
3224
3225 2011-04-02  Dan Bernstein  <mitz@apple.com>
3226
3227         Reviewed by Beth Dakin.
3228
3229         <details> marker loses its margin
3230         https://bugs.webkit.org/show_bug.cgi?id=57713
3231
3232         * rendering/RenderDetails.cpp:
3233         (WebCore::RenderDetails::computePreferredLogicalWidths): Override to update
3234         the marker location.
3235         * rendering/RenderDetails.h:
3236         (WebCore::RenderDetails::renderName): Made private.
3237         (WebCore::RenderDetails::isDetails): Ditto.
3238         * rendering/RenderDetailsMarker.cpp:
3239         (WebCore::RenderDetailsMarker::computePreferredLogicalWidths): Set the margins
3240         in the style, like RenderListMarker does.
3241         (WebCore::RenderDetailsMarker::layout): Set the margins from the style.
3242
3243 2011-04-02  Andy Estes  <aestes@apple.com>
3244
3245         Reviewed by Oliver Hunt.
3246
3247         REGRESSION (r69237): Black border around map elements while using an image map on Mac platform
3248         https://bugs.webkit.org/show_bug.cgi?id=52518
3249
3250         Test: fast/images/imagemap-focus-ring-zero-outline-width.html
3251
3252         * rendering/RenderImage.cpp:
3253         (WebCore::RenderImage::paintAreaElementFocusRing): Return early if outlineWidth is 0.
3254
3255 2011-04-02  Beth Dakin  <bdakin@apple.com>
3256
3257         Reviewed by Sam Weinig.
3258
3259         https://bugs.webkit.org/show_bug.cgi?id=57605
3260         Frame::pageScaleFactor() should not affect getBoundingClientRect() or 
3261         getClientRects()
3262         -and corresponding-
3263         <rdar://problem/9194541>
3264
3265         New functions adjust*ForPageScale() are analogous to adjust*ForAbsoluteZoom().
3266         * dom/Element.cpp:
3267         (WebCore::Element::getClientRects):
3268         (WebCore::Element::getBoundingClientRect):
3269         * dom/Range.cpp:
3270         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
3271         (WebCore::Range::getBorderAndTextQuads):
3272         * rendering/RenderObject.h:
3273         (WebCore::adjustFloatPointForPageScale):
3274         (WebCore::adjustFloatQuadForPageScale):
3275         (WebCore::adjustFloatRectForPageScale):
3276
3277 2011-04-02  Dan Bernstein  <mitz@apple.com>
3278
3279         Reverted r82775 due to changes in <details> test results, which are
3280         likely progressions.
3281
3282         * rendering/RenderBlockLineLayout.cpp:
3283         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
3284
3285 2011-04-02  Dan Bernstein  <mitz@apple.com>
3286
3287         Reviewed by Dave Hyatt.
3288
3289         Remove an unnecessary extra computeLogicalWidth() from line layout
3290         https://bugs.webkit.org/show_bug.cgi?id=57711
3291
3292         Changes in behavior (MathML progression) covered by existing layout tests.
3293
3294         * rendering/RenderBlockLineLayout.cpp:
3295         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
3296         call to computeLogicalWidth(). Because of <http://webkit.org/b/57700>, this
3297         actually prevents MathML rows from reverting to an incorrect width.
3298
3299 2011-04-02  Ryuan Choi  <ryuan.choi@samsung.com>
3300
3301         Reviewed by Martin Robinson.
3302
3303         [GTK] Fix leaked pointer in FontGtk.cpp
3304         https://bugs.webkit.org/show_bug.cgi?id=57307
3305
3306         Fix a memory leak.
3307
3308         No new functionality, so no new tests.
3309
3310         * platform/graphics/gtk/FontGtk.cpp:
3311         (WebCore::utf16ToUtf8): Rename utf16_to_utf8 and fix indentation.
3312         (WebCore::convertUniCharToUTF8):
3313
3314 2011-04-02  Ilya Tikhonovsky  <loislo@chromium.org>
3315
3316         Reviewed by Pavel Feldman.
3317
3318         Web Inspector: we should be able to have in and out arguments of a command with same name.
3319         https://bugs.webkit.org/show_bug.cgi?id=57701
3320
3321         * inspector/CodeGeneratorInspector.pm:
3322         * inspector/Inspector.json:
3323
3324 2011-04-01  Ilya Tikhonovsky  <loislo@chromium.org>
3325
3326         Not reviewed trivial change.
3327
3328         Web Inspector: The page agent should be enabled even if JAVASCRIPT_DEBUGGER is off.
3329         Followup change for r82281.
3330         https://bugs.webkit.org/show_bug.cgi?id=57327
3331
3332         * inspector/InspectorPageAgent.cpp:
3333         * inspector/InspectorPageAgent.h:
3334
3335 2011-04-01  Michael Saboff  <msaboff@apple.com>
3336
3337         Reviewed by Darin Adler.
3338
3339         Cached Resource Overhead Space Usage and Accounting Inaccurate
3340         https://bugs.webkit.org/show_bug.cgi?id=57488
3341
3342         Fixed windows test failures.
3343         Changed the fixed overhead value for ResourceResponse to 3800 bytes.
3344         Modified ResourceResponse::platformLazyInit() to handle "base" level
3345         attributes or all attributes.  The base attributes, like URL, status
3346         code, mime type and a few header fields (mostly cache related) are
3347         suitable for most resources.  This reduces the per resource memory
3348         needs by over 1K bytes per resource thus saving memory in the cache.
3349         Collectively, these two changes bring the overhead memory calculation
3350         in line with reality.
3351
3352         No new tests added due to existing tests cover areas of change and
3353         there is no functional change.  The change is limited to reducing 
3354         memory usage along existing paths.
3355
3356         * loader/cache/CachedResource.cpp:
3357         (WebCore::CachedResource::canUseCacheValidator):
3358         * platform/network/ResourceResponseBase.cpp:
3359         (WebCore::ResourceResponseBase::adopt):
3360         (WebCore::ResourceResponseBase::isHTTP):
3361         (WebCore::ResourceResponseBase::url):
3362         (WebCore::ResourceResponseBase::setURL):
3363         (WebCore::ResourceResponseBase::mimeType):
3364         (WebCore::ResourceResponseBase::setMimeType):
3365         (WebCore::ResourceResponseBase::expectedContentLength):
3366         (WebCore::ResourceResponseBase::setExpectedContentLength):
3367         (WebCore::ResourceResponseBase::textEncodingName):
3368         (WebCore::ResourceResponseBase::setTextEncodingName):
3369         (WebCore::ResourceResponseBase::suggestedFilename):
3370         (WebCore::ResourceResponseBase::setSuggestedFilename):
3371         (WebCore::ResourceResponseBase::httpStatusCode):
3372         (WebCore::ResourceResponseBase::setHTTPStatusCode):
3373         (WebCore::ResourceResponseBase::httpStatusText):
3374         (WebCore::ResourceResponseBase::setHTTPStatusText):
3375         (WebCore::ResourceResponseBase::httpHeaderField):
3376         (WebCore::ResourceResponseBase::setHTTPHeaderField):
3377         (WebCore::ResourceResponseBase::httpHeaderFields):
3378         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
3379         (WebCore::ResourceResponseBase::hasCacheValidatorFields):
3380         (WebCore::ResourceResponseBase::date):
3381         (WebCore::ResourceResponseBase::age):
3382         (WebCore::ResourceResponseBase::expires):
3383         (WebCore::ResourceResponseBase::lastModified):
3384         (WebCore::ResourceResponseBase::isAttachment):
3385         (WebCore::ResourceResponseBase::setLastModifiedDate):
3386         (WebCore::ResourceResponseBase::lastModifiedDate):
3387         (WebCore::ResourceResponseBase::wasCached):
3388         (WebCore::ResourceResponseBase::connectionReused):
3389         (WebCore::ResourceResponseBase::setConnectionReused):
3390         (WebCore::ResourceResponseBase::connectionID):
3391         (WebCore::ResourceResponseBase::setConnectionID):
3392         (WebCore::ResourceResponseBase::resourceLoadTiming):
3393         (WebCore::ResourceResponseBase::setResourceLoadTiming):
3394         (WebCore::ResourceResponseBase::resourceLoadInfo):
3395         (WebCore::ResourceResponseBase::setResourceLoadInfo):
3396         (WebCore::ResourceResponseBase::lazyInit):
3397         * platform/network/ResourceResponseBase.h:
3398         (WebCore::ResourceResponseBase::platformLazyInit):
3399         * platform/network/cf/ResourceResponse.h:
3400         (WebCore::ResourceResponse::ResourceResponse):
3401         (WebCore::ResourceResponse::memoryUsage):
3402         * platform/network/cf/ResourceResponseCFNet.cpp:
3403         (WebCore::ResourceResponse::platformLazyInit):
3404         * platform/network/mac/ResourceResponseMac.mm:
3405         (WebCore::ResourceResponse::platformLazyInit):
3406
3407 2011-04-01  Anantanarayanan G Iyengar  <ananta@chromium.org>
3408
3409         Reviewed by Adam Barth.
3410
3411         https://bugs.webkit.org/show_bug.cgi?id=45855
3412         Windowless plugins added dynamically to the DOM should receive paint events.
3413         This is done by ensuring that the plugin widget is marked for painting when
3414         it is added.
3415
3416         Test: plugins/windowless_plugin_paint_test.html
3417
3418         * rendering/RenderWidget.cpp:
3419         (WebCore::RenderWidget::setWidget):
3420
3421 2011-04-01  Mike Reed  <reed@google.com>
3422
3423         Reviewed by James Robinson.
3424
3425         always use native font rendering on skia_gpu
3426         fixes a crash when SKIA_GPU is enabled, as we can't call getTopPlatformDevice()
3427         https://bugs.webkit.org/show_bug.cgi?id=57663
3428
3429         No new tests. existing rendering tests will exercise this
3430
3431         * platform/graphics/skia/PlatformContextSkia.cpp:
3432         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
3433
3434 2011-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
3435
3436         Unreviewed, rolling out r82712, r82729, and r82746.
3437         http://trac.webkit.org/changeset/82712
3438         http://trac.webkit.org/changeset/82729
3439         http://trac.webkit.org/changeset/82746
3440         https://bugs.webkit.org/show_bug.cgi?id=57682
3441
3442         fast/frames/frame-programmatic-noresize.html is failing on
3443         Windows bots. Will look into this offline. (Requested by dydx
3444         on #webkit).
3445
3446         * html/HTMLFrameElement.cpp:
3447         (WebCore::HTMLFrameElement::HTMLFrameElement):
3448         (WebCore::HTMLFrameElement::attach):
3449         (WebCore::HTMLFrameElement::parseMappedAttribute):
3450         * html/HTMLFrameElement.h:
3451         (WebCore::HTMLFrameElement::noResize):
3452         * rendering/RenderFrame.cpp:
3453         * rendering/RenderFrame.h:
3454         * rendering/RenderFrameSet.cpp:
3455         * rendering/RenderFrameSet.h:
3456
3457 2011-04-01  Adam Barth  <abarth@webkit.org>
3458
3459         Reviewed by Tony Chang.
3460
3461         Valgrind error in _ZN7WebCore8Document11updateTitleERKNS_19StringWithDirectionE
3462         https://bugs.webkit.org/show_bug.cgi?id=57656
3463
3464         We should initialize memory when constructing objects.
3465
3466         * platform/text/StringWithDirection.h:
3467         (WebCore::StringWithDirection::StringWithDirection):
3468
3469 2011-04-01  Jer Noble  <jer.noble@apple.com>
3470
3471         Reviewed by Darin Adler.
3472
3473         WebKit2: Link from PDF opens in a new tab instead of in the same tab
3474         https://bugs.webkit.org/show_bug.cgi?id=57528
3475
3476         * WebCore.exp.in: Export MouseEvent::create().
3477
3478 2011-04-01  John Bauman  <jbauman@chromium.org>
3479
3480         Reviewed by Kenneth Russell.
3481
3482         Avoid decoding images twice in texImage2D
3483         https://bugs.webkit.org/show_bug.cgi?id=51498
3484
3485         Make sure to redecode the image only if it's not opaque and texImage2D
3486         wouldn't premultiply it anyway.
3487
3488         * platform/graphics/BitmapImage.h:
3489         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3490         (WebCore::GraphicsContext3D::getImageData):
3491         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3492         (WebCore::GraphicsContext3D::getImageData):
3493
3494 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
3495
3496         32-bit Mac build fix.
3497
3498         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): Use 0U to index a String
3499         to avoid ambiguity.
3500
3501 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
3502
3503         Reviewed by Darin Adler.
3504
3505         Make WebKit2 text input handling more like WebKit1
3506         https://bugs.webkit.org/show_bug.cgi?id=57649
3507
3508         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): Put back the assertions