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