Opera Software upstreamed commits

Upstreamed commits in Chromium: 7923, V8: 62, Skia: 12, BoringSSL: 16.

Click message to expand

Chromium

Author Message When
fs
Resolve computed 'transform-origin' for SVG elements
Make the local helper ReferenceBoxForTransform available via
ComputedStyleUtils and use it in TransformOrigin::CSSValueFromComp...
Replace usages of MinimumValueForLength with FloatValueForLength. This
matches what is done when resolving/applying transform in the general
case.
Also sink the common handling of the 'z' component out of the 'if'.

Bug: 740300
Change-Id: Id0e6cbcc85942ccc8cdb3f8ed86ecc6e7aaf492e
Reviewed-on: https://chromium-review.googlesource.com/c/1382434
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617548}
fs
Resolve percentages in computed 'transform' for SVG elements
SVG (child; non-root) elements should resolve percentages in computed
'transform' values just like regular boxes.

Rename ComputeTransformReferenceBox to ComputeSVGTransformReferenceBox
(for clarity) and expose it for a wider audience. Make it apply the
effective zoom, since both clients require that.
Use ComputeSVGTransformReferenceBox in ComputedStyleUtils to compute the
reference box for the LayoutObject in question.

Bug: 915426
Change-Id: I5323056cc54ff07e0b3cf943f52a7210ea320c78
Reviewed-on: https://chromium-review.googlesource.com/c/1382433
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617515}
fs
Narrow "is constrained" check for LayoutImage layout invalidation
If our containing block has auto height, we need to relayout.
Add !HasAutoHeightOrContainingBlockWithAutoHeight() to the
condition for |image_size_is_constrained|.

Bug: 870599
Change-Id: I22858843d7ad87c63eb7b8d6e771e0f8d6cfa09d
Reviewed-on: https://chromium-review.googlesource.com/c/1373823
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617446}
bratell
Call the client hints factory "client hints factory".
Jumbo builds failed when several files claimed to define
the g_previews_service_factory.

Change-Id: Id16f0c0c66da9fdb7c0d42afda611d672ab6da14
Reviewed-on: https://chromium-review.googlesource.com/c/1377441
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#616722}
bratell
[jumbo] Replace one of two colliding GetMainFrame with IsMainFrame()
There were two GetMainFrame() functions in chrome/browser which
clashed in jumbo (unity) builds. Since one of them is only
used to check if the current frame is the main frame, simplify
the code a bit.

Change-Id: I2d0b30d4ca2c18f202db709514c55c84a7eb350f
Reviewed-on: https://chromium-review.googlesource.com/c/1378140
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#616720}
bratell
[jumbo] Rename a GetBrowserContext function
There are several GetBrowserContext functions in content/browser
and in jumbo builds, base::BindRepeating did not know which
one to use. This renames one of them to make it clear for everyone,
including the compiler in jumbo builds.

Change-Id: Ifd35c418ae780c8e7874603c1e261cb3db02acf0
Reviewed-on: https://chromium-review.googlesource.com/c/1377740
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616715}
fs
Use StyleColor for the stop-color property
This changes the ComputedStyle storage for the stop-color property to be
a StyleColor rather than a plain color. This fixes explicit inheritance
for the property ('currentcolor' computes to itself).
It also means we'll properly pick up changes to 'color'.

Bug: 914728
Change-Id: I3c78a3615220b9149d1ea5102a6e5863526a6d51
Reviewed-on: https://chromium-review.googlesource.com/c/1377437
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#616660}
fs
Refactor "needs layout" check in LayoutImage
Move the conditions used to check if layout is needed when the intrinsic
size changes out into a new function, and call that from
LayoutImage::InvalidatePaintAndMarkForLayoutIfNeeded.
Replace open-coded HasRelativeLogicalWidth() with a call to that method.

Bug: 870599
Change-Id: Iae480326083eb493d58233378d95af8c1dd62f0a
Reviewed-on: https://chromium-review.googlesource.com/c/1373839
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616624}
fs
Add reftest-wait to css/filter-effects/svg-sourcegraphic-currentcolor-dynamic-001.html
Attempt to stabilize in Gecko.

Bug: 626744
Change-Id: Idfa06176948d1ffaf6ba8e65263bf5818ffd321b
Reviewed-on: https://chromium-review.googlesource.com/c/1375875
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616543}
joleksy
[Mac] Use non-autoreleased mock object in ScopedBundleSwizzlerMac
The "release" call in the destructor might or might not destroy the
mock object, depending on current autorelease pool.
If we add to the picture the local autorelease pool (used in tests),
we no longer can name the class "Scoped".

The fix creates OCPartialMockObject without the helper function,
avoiding the autoreleasability.

Change-Id: Id17a1ef571246370f6e84cde60773f90d7d35cb0
Reviewed-on: https://chromium-review.googlesource.com/c/1375871
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616424}
fs
Return used width/height for SVG <image>, <rect> and <foreignObject>
Per https://drafts.csswg.org/cssom/#resolved-values we should return the
"used value" for 'width' and 'height' on these elements [1].
This behavior was clarified in SVGWG GitHub issue #349 [2].

[1] And also on <svg>, but we don't support those properties there yet.
    Tests added for that case too though.
[2] https://github.com/w3c/svgwg/issues/349

Bug: 772707
Change-Id: Ic7b6b148883d4380daadb41b62bddd02da55e1af
Reviewed-on: https://chromium-review.googlesource.com/c/1374291
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#616343}
fs
Regression test for crbug.com/626744
Bug: 626744
Change-Id: I4244c3f0316ceb55bc69655212f6677345b0a6cc
Reviewed-on: https://chromium-review.googlesource.com/c/1374988
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#616311}
tmoniuszko
Avoid modifying Windows registry in RemoveProtocolHandler test
Writing to Windows registry requires elevated privileges and the test
fails on Windows 7 unless it's run as administrator (but in this case
all modifications stay in registry because the test doesn't do the
cleanup during its tear down).

Bug: 849660
Change-Id: I6cb8e9b2ba30e5bd9af2d8ede97c9bd62ccbc9ca
Reviewed-on: https://chromium-review.googlesource.com/c/1348115
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616303}
bratell
Don't compile Windows chrome_cleaner prompt code on other OSes
srt_chrome_prompt_impl.cc is code that is only used in Windows
but was compiled for all operating systems. Since it uses constants
that only exist in Windows it's kind of lucky that it doesn't
cause any problems, except in some jumbo build experiments where
there was linker errors.

(TBR for name change in BUILD.gn)
TBR=nparker@chromium.org

Bug: 904958
Change-Id: If1e3f76c7bc913d4041d0cb38b4891d898d24506
Reviewed-on: https://chromium-review.googlesource.com/c/1350870
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#616067}
bratell
Fix full ChromeOS builds - generated cryptauth proto file has moved.
ChromeOS cryptauth unittest use cryptauth_api.pb which moved from
components/cryptauth to chromeos/services/device_sync in bug 912743.
A file still included that file from the old path (and the new path)
which worked in trees where an earlier tree had generated it but didn't
work in a clean tree. The files presumably had the same include guards
so that is was ok to include both.

TBR=khorimoto@chromium.org

Bug: 912743
Change-Id: I6708c674f5fd99c94e233df5ec9b9c462c7814ad
Reviewed-on: https://chromium-review.googlesource.com/c/1373826
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#615911}
bratell
[jumbo] Give two MaybeGetConnectorForProcess unique names
In some (non default) jumbo configurations, two identical
MaybeGetConnectorForProcess functions ended up in tha same
translation unit. It would be good to share the implementation
between frame_host and renderer_host but I know no good place
and the function is small, so instead give them unique names.

Change-Id: I6dcb65e7f3a095ec7a73bd6bc40944180ddc6f07
Reviewed-on: https://chromium-review.googlesource.com/c/1348334
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#615898}
bratell
Don't compile app_icon_factory except for ChromeOS.
Compiling app_icon_factory  code triggered compilation errors in some
Windows and Mac builds since the code references app_list which
only exists in ChromeOS. In most builds it was ok because the generated
object file was unused and got stripped by the linker before the dangling
references was found.

BUG=826982

TBR=nigeltao@chromium.org,rdevlin.cronin@chromium.org,dominickn@chromium.org

Change-Id: I25f0fa090f3466bcc83e06a070c7aa6c8600976d
Reviewed-on: https://chromium-review.googlesource.com/c/1373450
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#615856}
fs
Reduce type-impedance for LayoutImageResource::GetImage
The container size will be converted to FloatSize in the end, so make
the argument type a FloatSize too rather than a LayoutSize.
Clean up callers, removing some conversions in SVGImagePainter, and add
an IntSize overload (since it's common to call GetImage with an
IntSize).

Change-Id: I4f5c4389d21617ad60d18b258674999e9ef51f2c
Reviewed-on: https://chromium-review.googlesource.com/c/1367651
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#615130}
bratell
Don't prefix absolute paths in gn_run_binary.py.
Absolute paths become broken paths if prefixed with ./ so
only do the ./ addition for non-absolute paths.

The result would be that the command failed with:
"WindowsError: [Error 2] The system cannot find the file specified"
on the command execution. This could easily be misunderstood as
some argument to the command being wrong.

You get absolute paths in gn when using rebase_path(path) with no
extra arguments. This is the recommended and supported way to interact
with external programs since gn internal paths can contain and be
based on "//" which is not understood by anyone but gn internally.


Change-Id: I2ab49f529c7d030f73f693e5ea6cacc5ebbf3c99
Reviewed-on: https://chromium-review.googlesource.com/c/1367670
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615087}
bratell
Don't build ppapi/{proxy,shared_impl} with jumbo in nacl
An upcoming CL triggers nacl toolchain problems in jumbo builds where
some combination of template instantiations cause some build errors.
To not block that CL, disable jumbo for nacl in relevant directories.

Bug: 912152
Change-Id: Ie79729414d765fec22325bacdb7df8cf714457f3
Reviewed-on: https://chromium-review.googlesource.com/c/1363282
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#614014}
fs
Eliminate unnecessary uses of Node::ToNode
This method is supposed to be used to go from an EventTarget to its node
(if any). Remove uses where it's called on something that obviously
derives from Node already.
Make it private on Node to prevent any future such uses.

Change-Id: I0ed70ac122e877ae90ee7c6f6c53caaa63edd574
Reviewed-on: https://chromium-review.googlesource.com/c/1361070
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#613910}
fs
Clamp contents visual overflow for LayoutSVGRoot
If the contents overflow rect for the SVG root is too large, it could
end up shifting the overflow rect such that it is culled and thus never
painted.

To avoid this, clip the content overflow rect with
LayoutRect::InfiniteIntRect(). This gives reasonable enough leeway, and
also matches the rect that is commonly used to represent infinity for
culling and clipping etc.

Bug: 911186
Change-Id: I22d505ac0582f4d1fe6ac3ead9041c4a87176994
Reviewed-on: https://chromium-review.googlesource.com/c/1361225
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#613692}
fs
Simplify GraphicsContext::ApplyHighContrastFilter implementations
We assume that SkColor <=> Color::Rgb(), so simplify the Color variant
accordingly.

PaintFlags are always passed as constant references, so pass it like
that to the PaintFlags variant too and remove the null-checks. Also
always explicitly copy the PaintFlags so that we get RVO.

Change-Id: I46b6f5aff7cbe175d6b9a2ff8277ff5ce9b4fce8
Reviewed-on: https://chromium-review.googlesource.com/c/1358497
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#613158}
fs
Restore "same layer" check in CalculateRectsWithGeometryMapper
If the root layer and the "current" layer are the same, we can't really
guarantee that the "pre"-transform is the same as the "local border
box"-transform - for example in the case where we're performing a hit-
test from/under a foreignObject element which has a 'transform' applied.

Bug: 908570
Change-Id: Icbaf3c15ca7b483f8209d5d0cc8b4613d80d49ce
Reviewed-on: https://chromium-review.googlesource.com/c/1355184
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612643}
fs
Disabled (empty) SVG shapes cannot be hit
Disabled SVG shapes [1][2][3] should not be possible to hit since they
are considered "not rendered".

[1] https://svgwg.org/svg2-draft/shapes.html#RectElement
[2] https://svgwg.org/svg2-draft/shapes.html#CircleElement
[3] https://svgwg.org/svg2-draft/shapes.html#EllipseElement

Bug: 896641
Change-Id: I5fe530722a4d60ecd416cd68f06a7555bb6a520f
Reviewed-on: https://chromium-review.googlesource.com/c/1353983
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#611840}
auygun
Fix frequency index set for AAC Parametric Stereo profile.
Bug: 908472
Change-Id: I2d67e946f46a83b930a22ace762cb064e73bb8fb
Reviewed-on: https://chromium-review.googlesource.com/c/1350894
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Attila Uygun <auygun@opera.com>
Cr-Commit-Position: refs/heads/master@{#611634}
fs
Clean up LayoutSVGShape::NodeAtPoint
Since LayoutSVGShape::NodeAtPointInternal is now only called from
LayoutSVGShape::NodeAtPoint, we can make it private. Rename it to
something more helper-like - HitTestShape.

Move the check of 'visibility' to LayoutSVGShape::NodeAtPoint from
HitTestShape, to better match other similar methods.

Change-Id: If251b8b9258b754bfc94044739d6a8c41f1b04e7
Reviewed-on: https://chromium-review.googlesource.com/c/1352253
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#611618}
fs
Remove Pattern-wrapper in GeneratedImage::DrawPattern
Don't create a Pattern just to have it create a PaintShader - just
create the PaintShader directly.

Change-Id: I85b96ed9becea31e93d62191baac263f08f53f91
Reviewed-on: https://chromium-review.googlesource.com/c/1352258
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611258}
bratell
Give autofill's LegacyStrikeDatabas constants legacy names
In some (non default) jumbo configurations, strike.cc and
legacy_strike_database.cc compile in the same translation
unit and then some constants clash. Assuming
LegacyStrikeDatabase will soon go away, just give its
constants a bit longer names.

Bug: 884817
Change-Id: I1dc6d8b6499d3c6195a56423236198a02c32f3f0
Reviewed-on: https://chromium-review.googlesource.com/c/1348471
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610594}
fs
Move StyleBuilderConverter::ConvertValueToNumber to FilterOperationResolver
This function has a very generic name, but not a wide enough use case to
match. Move it to FilterOperationResolver, where its only two callers
are. Rename to something less generic.

Change-Id: Ibe6eaf68fbeddd86464d508cba3d6b235117f780
Reviewed-on: https://chromium-review.googlesource.com/c/1348096
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#610474}
fs
Expose all constants on SVGFEBlendElement
Per:

  https://drafts.fxtf.org/filter-effects/#InterfaceSVGFEBlendElement

All other browsers expose these already.

Bug: 906612
Change-Id: I4be6185d4832d980a5d7c6518dcb0b2ccca2ce82
Reviewed-on: https://chromium-review.googlesource.com/c/1341846
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610379}
fs
Fix typo'd URL for Blink license entry
Three 'w' should be enough for everyone...

Bug: 907470
Change-Id: I7a724e708b73e4d5a80bcd28a2a459912e5ae69b
Reviewed-on: https://chromium-review.googlesource.com/c/1346399
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#610147}
fs
Add one more test for viewport units in SVG-in-<img> context
This one using inline style instead of presentation attributes.

Bug: 650147
Change-Id: I00ee6c52b95803a928dd0b95a33da89f531a05ac
Reviewed-on: https://chromium-review.googlesource.com/c/1344102
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#609772}
bratell
Resolve conflict between two policy::kMaxValue
Both
components/policy/core/common/cloud/machine_level_user_cloud_policy_metrics.h
and
components/policy/core/common/cloud/enterprise_metrics.h
define policy::kMaxValue in two different enums. If code includes
both headers, it won't compile and this happens in some jumbo
build configurations.

This patch changes one of the enums to use enum class so that
the symbols are in different namespaces. (One will shadow the
other but as long as they are used correctly it will be fine)

Bug: 905702
Change-Id: Ia4dd0c89dc8ec5c23c516e90eae7f6c3256a232a
Reviewed-on: https://chromium-review.googlesource.com/c/1344129
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609769}
bratell
Jumbo support for ppapi (-7.5 CPU minutes)
Jumbo is a unity build system for Chromium (see
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/jumbo.md )
which merges cc files at the build target level.

The code in //ppapi needs roughly 15 CPU minutes to compile in my
measurements, which is 2.3% of the total jumbo build time and one of
the largest remaining non-thirdparty code blocks without jumbo support.

This saves about 7.5 CPU minutes in a jumbo build, which is
a bit over 1% of the total reference build time. It doesn't cover
thunk which is most of the remaining compile time. There are
too much generated code with reused symbol names in thunk for it
to be trivially supported right now.

Bug: 898475
Change-Id: I1ee592578ac765cbd58cb856fcd5f331d3dd8c50
Reviewed-on: https://chromium-review.googlesource.com/c/1297366
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609687}
bratell
Update some documentation for the binary_size tool
The documentation didn't include the crucial information
that generate_linker_map has to be set to true in gn for the tool
to work in Linux.

Bug: 716209
Change-Id: I62919e26a80a0b5d592f6b8953762e35575142d2
Reviewed-on: https://chromium-review.googlesource.com/c/1338085
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609686}
wdzierzanowski
Initialize TestNavigationObserver::last_navigation_type_ in ctor
With |TestNavigationObserver::last_navigation_type_| initialized properly, it's
possible to use TestNavigationObserver::last_navigation_type() to check whether
a navigation is still ongoing.

Change-Id: Ie814270d5e79bebb95e7ebea05c1ed7eb53bf88c
Reviewed-on: https://chromium-review.googlesource.com/c/1340813
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#609462}
yorenault
[Mac] Fix cursor when dropping to desktop
Allow mouse cursor to be a green plus when dropping items to desktop

Bug: 905238
Change-Id: I90a6f7156e681271f577f1f604f1d75ada4beba2
Reviewed-on: https://chromium-review.googlesource.com/c/1334994
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609410}
fs
Add test for viewport units in SVG-in-<img> context
Bug: 650147
Change-Id: I4a158f600acb733477d33ebbd6a504490a5b54a4
Reviewed-on: https://chromium-review.googlesource.com/c/1341836
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609346}
bratell
[doc] Jumbo builds can't be considered experimental anymore
Change-Id: I88b641bf356044ca94552273081af22c0fde1795
Reviewed-on: https://chromium-review.googlesource.com/c/1341530
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609218}
fs
Fix parsing of negative values for 'r', 'rx', 'ry' and 'stroke-width'
For all of these properties[1][2][3][4], a negative value is considered
illegal and should fail in the parser. (The value range is already
corectly specified for instance for animation, and also for the
corresponing presentation attributes.)

[1] https://svgwg.org/svg2-draft/geometry.html#R
[2] https://svgwg.org/svg2-draft/geometry.html#RX
[3] https://svgwg.org/svg2-draft/geometry.html#RY
[4] https://svgwg.org/svg2-draft/painting.html#StrokeWidthProperty

Bug: 902346
Change-Id: I4b073288b97151d7a9df4b1c2ce99341dca9c8ee
Reviewed-on: https://chromium-review.googlesource.com/c/1304561
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609077}
bratell
Drop jumbo support for .S asm files
We don't need it and it doesn't work. It's probably been ok up
until now because we have never had more than one S file per
build target.

See errors at
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Jumbo%20Win%20x64/22538

R=fs@opera.com

Change-Id: Idde99aba83e01c0111e5a50590e319993e0effaa
Reviewed-on: https://chromium-review.googlesource.com/c/1340312
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#608826}
bratell
Have linux-jumbo-rel build with non-goma jumbo chunk size
Currently linux-jumbo-rel, the CQ bot, builds with the default
jumbo chunk size, and since it uses goma that is 8. Building
with relatively small chunks (8) means that it doesn't notice
symbol clashes that happen with larger chunks so it's better to
build with the non-goma default, 50.

This will slightly reduce parallelism of builds, and might trigger
more files to be recompiled for changes, but it will also bring
along with it the benefits of larger jumbo chunks (less CPU cycles
spent per compiled cc file, faster linking) so it's not obvious
how it will affect performance, if at all.

Bug: 905588
Change-Id: I950ef63093f60580e98891aa0f556fa57b5d6628
Reviewed-on: https://chromium-review.googlesource.com/c/1337496
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#608822}
fs
Fix serialization of computed style for 'paint-order'
We were always serializing as the completed (all keywords present) form,
which is not the shortest canonical form.

 https://svgwg.org/svg2-draft/painting.html#PaintOrder

Fold the ComputedStyleUtils helper into the PaintOrder CSSProperty
class, since this is very specific to this property.

Matches WebKit and almost Gecko (which seems to handle some "two
keyword" cases differently.)

Bug: 904898
Change-Id: Ib796a111e601485e339fdf2739a587fb5f893b8a
Reviewed-on: https://chromium-review.googlesource.com/c/1335579
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608623}
bratell
Restore the nonull warning in chrome/browser/ui for everything but mac
-Wno-null has been disabled for clang in chrome/browser/ui since 2015
but it seems to be enough to disable that warning for mac (the only
platform that used clang by default in 2015).

Bug: 383820
Change-Id: Iadc03f761c120db91fb806369ecf6f3bd8459c1c
Reviewed-on: https://chromium-review.googlesource.com/c/982057
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608368}
mharanczyk
[IWYU] Add missing include in scoped_generic_unittest.h for std::make_unique.
Change-Id: Ie5725cd32fff43807e6f4129d7234ecf1143e14b
Reviewed-on: https://chromium-review.googlesource.com/c/1335575
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Cr-Commit-Position: refs/heads/master@{#608306}
bratell
Remove references from .gn to third_party/mesa
third_party/mesa is no longer part of Chromium, and having it
listed here enforces gn checks for any product that still
checks out mesa in third_party (i.e. Google Chrome) which is
a problem.

Bug: 873321
Change-Id: If1c28fb2c393f04c9b0fe0703204fd7225a1a483
Reviewed-on: https://chromium-review.googlesource.com/c/1333812
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607653}
fs
Fixes and tweaks to wpt/css/filter-effects/
filter-contrast-003.html

  Adjust the color from #400000 to #3f0000, since (0x40 / 255) is just
  over 0.25 and can after filtering and rounding end up above 0.
  (0x3f / 255) on the other hand is just below 0.25 and the result will
  be clamped to zero.

filter-external-001-test.html
filter-external-002-test.html

  Change the hue-rotate parameter in the external file from 120 to 150.
  Move the file to support/ and remove lint entry.
  Make both filters operate in sRGB to make computing the reference
  easier. Use rgb(...) notation with percentage values in reference.

fecolormatrix-type.html

  Add color-interpolation-filters=sRGB to the filter to make it easier
  to reason about what the result should be. Use rgba(...) notation in
  the ref using percentage notation.

filters-test-brightness-003.html

  Add 'filter: brightness(0)' before 'filter: brightness()' to properly
  test if the "no argument" notation is considered valid by the parser.

filter-grayscale-001.html
filter-grayscale-002.html
filter-grayscale-003.html
filter-grayscale-004.html
filter-grayscale-005.html

  Remove the " (and not blue)" text from the reference and update the
  001,004 and 005 tests accordingly.

css-filters-animation-saturate.html

  Interpolate the argument from 4900% rather than 5000% to end at the
  ref's 2500% (25).

css-filters-animation-hue-rotate.html

  Sample the animation at .5 to match the expectation.

css-filters-animation-drop-shadow.html

  Use explicit rgba(...) in the ref rather than the keyword 'gray'.
  We're interpolating the color of the drop-shadow from 'black'
  (rgba(0, 0, 0, 1)) to 'transparent' (rgba(0, 0, 0, 0)) here, so it's
  better and more accurate to describe the color as "semi-transparent
  black" (rgba(0, 0, 0, 0.5)).

css-filters-animation-combined-001.html

  Initial value for animation for 'opacity(...)' is '1' - not zero.
  Change test to interpolate from 0 -> 1 (rather than 1 -> 1)

Bug: 903383
Change-Id: I4d0113989414616494b98c22fbac817f007cd762
Reviewed-on: https://chromium-review.googlesource.com/c/1333816
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#607628}
fs
Slimmer SVG enumeration tables
This replaces a Vector<std::pair<..., ...>> with a new SVGEnumerationMap
class that wraps a list of entries (also "pairs".) The setup of the map
is however not done runtime but rather compile time, saving a bunch of
code footprint in the process.

Change-Id: If2c77f1ebcf15dcf8fc75d6a25cacebf42401287
Reviewed-on: https://chromium-review.googlesource.com/c/1329974
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#607620}
bratell
[jumbo] Avoid using kSymbolKey name in the blink scope
There is a kSymbolKey in the public API and due to the new
enum shadow warnings, jumbo builds might combine the code in
such an order that the public blink::WebInputEvent::kSymbolKey
shadows the blink::{anonymous namespace}::kSymbolKey.

Note, there is no bug, just an unfortunate false warning and one
that only appears in rare jumbo builds.

Change-Id: Id575b2aef3b3f1be46d3722ed79454212bcf650e
Reviewed-on: https://chromium-review.googlesource.com/c/1333649
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607606}
bratell
[ppapi] Merged two identical interface_name
In jumbo build experiments, two cc files both defined
interface_name<PPB_InputEvent_1_0>() which clashed since in
jumbo builds many cc files are compiled in the same translation unit.

This moves the shared code to a shared file.

Bug: 898475
Change-Id: I9ce58e837d663cb5c15ba2596c22812a41def4c0
Reviewed-on: https://chromium-review.googlesource.com/c/1297148
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sam Clegg <sbc@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#607601}
bratell
Let gn check verify that blink/public dependencies are sane
We can't have gn check look through all of blink because it's
a messy monolithic pile of internal dependencies, but the
public API layer has strict rules that should be enforced by
gn check.

Also removing a mojo header from a build target since it's supposedly
already in a mojo build target and listing it here as well
makes gn check unhappy.

Bug: 898837
Change-Id: Id46485ffa4ffeb0c897f6d22e684f6d45d4804e6
Reviewed-on: https://chromium-review.googlesource.com/c/1307373
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607283}
fs
Use a table for CSSSelectorParser's custom pseudo element use counter
This if cascade consumes both a fair bit of footprint while it makes the
switch slightly less readable.

Change-Id: Ia8cb0d14ec831ccfcf7f22154a12f16d44fbc9ad
Reviewed-on: https://chromium-review.googlesource.com/c/1329147
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607223}
bratell
Avoid -Wshadow warnings related to content::UNINITIALIZED
Due to a new clang, a couple of shadowing warnings
appeared in existing code, related to enum values INVALID,
UNINITIALIZED and RUNNING. This patch moves both clashing
enums into enum classes.

Full errors below:

In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10:
../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:23: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow]
  enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE };
                      ^
./../../content/browser/browser_thread_impl.cc:36:3: note: previous declaration is here
  UNINITIALIZED = 0,
  ^
In file included from gen/content/browser/browser_jumbo_1.cc:505:
In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10:
../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:38: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow]
  enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE };
                                     ^
./../../content/browser/browser_thread_impl.cc:38:3: note: previous declaration is here
  RUNNING,
  ^
In file included from gen/content/browser/browser_jumbo_1.cc:505:
In file included from ./../../content/browser/renderer_host/input/synthetic_gesture.cc:10:
../../content/browser/renderer_host/input/synthetic_pointer_action.h:30:47: error: declaration shadows a variable in namespace 'content::(anonymous)' [-Werror,-Wshadow]
  enum GestureState { UNINITIALIZED, RUNNING, INVALID, DONE };
                                              ^
./../../content/browser/frame_host/ancestor_throttle.cc:52:3: note: previous declaration is here
  INVALID = 6,
  ^

TBR=avi@chromium.org

Change-Id: I2877006171e318dc43fe66ed4c2bcd558f6233a8
Reviewed-on: https://chromium-review.googlesource.com/c/1326498
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606536}
bratell
Avoid shadowing problems with TOTAL_KEYWORDS and others
gperf can generate symbols directly into the global namespace
(in this case wrapped in "blink") or into more tight scopes.
Most of the code generates into a tight scope but not
css_property_names.cc. In a new clang a shadowing warning appeared
in jumbo builds because of it. There seems to be no downside
to using a reduced scope.

In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152:
./gen/third_party/blink/renderer/core/css_value_keywords.cc:3612:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
      TOTAL_KEYWORDS = 842,
      ^
./gen/third_party/blink/renderer/core/css_property_names.cc:55:5: note: previous declaration is here
    TOTAL_KEYWORDS = 554,
    ^
In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152:
./gen/third_party/blink/renderer/core/css_value_keywords.cc:3613:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
      MIN_WORD_LENGTH = 1,
      ^
./gen/third_party/blink/renderer/core/css_property_names.cc:56:5: note: previous declaration is here
    MIN_WORD_LENGTH = 1,
    ^
In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152:
./gen/third_party/blink/renderer/core/css_value_keywords.cc:3614:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
      MAX_WORD_LENGTH = 42,
      ^
./gen/third_party/blink/renderer/core/css_property_names.cc:57:5: note: previous declaration is here
    MAX_WORD_LENGTH = 34,
    ^
In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152:
./gen/third_party/blink/renderer/core/css_value_keywords.cc:3615:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
      MIN_HASH_VALUE = 18,
      ^
./gen/third_party/blink/renderer/core/css_property_names.cc:58:5: note: previous declaration is here
    MIN_HASH_VALUE = 9,
    ^
In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152:
./gen/third_party/blink/renderer/core/css_value_keywords.cc:3616:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
      MAX_HASH_VALUE = 6641
      ^
./gen/third_party/blink/renderer/core/css_property_names.cc:59:5: note: previous declaration is here
    MAX_HASH_VALUE = 3587
    ^
5 errors generated.

Change-Id: I03ffd31e0b6731b2e8bacb1e7222be5defce3ea4
Reviewed-on: https://chromium-review.googlesource.com/c/1326500
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606535}
fs
Handle word-spacing for leading white space on SVG text
SVGTextLayoutEngineSpacing checking if the current and last characters
were non-nuls before attempting to apply word-spacing. This would mean
that we'd never add word-spacing at the beginning of a text box.
Remove the checks for non-nuls.

Bug: 902839
Change-Id: I751e1bd1317f7411960d137b7e55a3b83e8cb0df
Reviewed-on: https://chromium-review.googlesource.com/c/1326156
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#606528}
bratell
Put a bluetooth enum in an enum class to shadowing errors
A bluetooth enum was putting some common names like "SUCCESS",
"UNKNOWN" and "FAILED" in the content namespace. A recent
clang (I think) added new warnings when these got
got shadowed by other uses of the names. See full error below.

This enum was always intended to be in an enum class judging from
how it's used, so just use enum class to avoid further clashes.

This primarily affected jumbo builds but could happen to any build
which happened to include two conflicting headers in the same file.

../../content/browser/histogram_synchronizer.h:54:5: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow]
    UNKNOWN,
    ^
../../content/browser/bluetooth/bluetooth_metrics.h:228:3: note: previous declaration is here
  UNKNOWN = 5,
  ^
In file included from gen/content/browser/browser_jumbo_1.cc:170:
In file included from ./../../content/browser/devtools/devtools_instrumentation.cc:16:
../../content/browser/frame_host/navigation_request.h:68:5: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow]
    FAILED,
    ^
../../content/browser/bluetooth/bluetooth_metrics.h:229:3: note: previous declaration is here
  FAILED = 6,
  ^
In file included from gen/content/browser/browser_jumbo_1.cc:247:
In file included from ./../../content/browser/download/drag_download_file.cc:5:
../../content/browser/download/drag_download_file.h:53:37: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow]
  enum State {INITIALIZED, STARTED, SUCCESS, FAILURE};
                                    ^
../../content/browser/bluetooth/bluetooth_metrics.h:223:3: note: previous declaration is here
  SUCCESS = 0,
  ^

TBR=jyasskin@chromium.org

Change-Id: I2f35c1c11262e4f071cf1d64348c9bc30c76351b
Reviewed-on: https://chromium-review.googlesource.com/c/1326507
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606520}
bratell
Avoid shadowing UNKNOWN (defined in both quic and ftp)
If you include both net/ftp/ftp_directory_listing_parser.h and
net/quic/quic_chromium_client_session.h you get an error
about an UNKNOWN shadowing another UNKNOWN. I don't think this
is a new problem but something we got with a new clang version.

This renames the net::UNKNOWN to net::UNKNOWN_CAUSE so that
net::FtpDirectoryListingEntry::UNKNOWN and other unknown
UNKNOWNs can stay.

net/ftp/ftp_directory_listing_parser.h:21:5: error: declaration shadows a variable in namespace 'net' [-Werror,-Wshadow]
    UNKNOWN,
    ^
net/quic/quic_chromium_client_session.h:83:3: note: previous declaration is here
  UNKNOWN,
  ^
1 error generated.

TBR=zhongyi@chromium.org

Change-Id: I96c6c8ba3b923a691537debbfe468874c767b939
Reviewed-on: https://chromium-review.googlesource.com/c/1326494
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606509}
bratell
Make it easier to surgically exclude targets from jumbo
Currently disabling jumbo for a build target in a local build means
that you also disable jumbo for all other targets with the same local
name, and giving a fully qualified label as name won't work at
all. This patch changes the matching to be more flexible so that you
can supply both a local name (as before) but also a full path or
qualified name like //third_party/blink/renderer/core/svg:svg

Bug: 825240
Change-Id: I706e4d7c3f863a7996e576d36ddd62ac81b8cb12
Reviewed-on: https://chromium-review.googlesource.com/c/1323110
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#606433}
fs
Remove fast/hidpi/image-srcset-relative-svg-canvas{,-2x}.html expectations
Does not appear to be flaky anymore.

TBR=schenney@chromium.org

Bug: 306222
Change-Id: I4e381ca9d89e5495cb98286e0fd387b94d67c125
Reviewed-on: https://chromium-review.googlesource.com/c/1326008
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#606413}
bratell
Unleak blink's internals from web_graphics_context_3d_provider.h
A change included an internal blink header in the public api
layer which then leaked parts of blink's internal out into the
wild dangerous world outside. This is a quick fix to close that
leak. Might need some tuning.

Bug: 902022
Change-Id: I076f4c5d0a27cd4c3070d8fe8a5be97f2f65e1e0
Reviewed-on: https://chromium-review.googlesource.com/c/1323715
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606409}
bratell
Remove using namespace from components/signin code
The using namespace construct is disallowed in the code style guide.
It also causes issues (compilation warnings turned into errors)
in jumbo builds since they will be in a "header context" there
which is explicitly blocked by our compiler settings.

This patch also has a bit of a feature creep to remove a number
of unnecessary static_casts that made the code hard to read,
especially with the namespaces.

Change-Id: Icaa4968695a6f033868aac681a9ebe08eee75c3e
Reviewed-on: https://chromium-review.googlesource.com/c/1320131
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606113}
fs
Reenable fast/hidpi/image-srcset-relative-svg-canvas{,-2x}.html
Hopefully these tests are no longer flaky, but as a cautionary step,
mark them as Pass/Fail for now and keep an eye on them.

TBR=schenney@chromium.org

Bug: 306222
Change-Id: Ia0e87564e2113dfaa50cd723654786805026924d
Reviewed-on: https://chromium-review.googlesource.com/c/1322789
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#606010}
bratell
Jumbo build fix: Rename some test constants in peerconnection
In jumbo builds many cc files compile in the same translation
unit. That means that they also share the same anonymous namespace
(which is per translation unit, not per file which would have
been better). In https://chromium-review.googlesource.com/c/1316836
and https://chromium-review.googlesource.com/c/1315534 two
peerconnection tests each added a kWriteBufferSize and a
kDelegateReadBufferSize with different values which broke
some jumbo build configurations (unluckily not the one in CQ but
some in fyi builders).

This renames the variables to have more unique names.

TBR=shampson@chromium.org,hbos@chromium.org

Bug: 874296
Change-Id: Ifc8af2be440f7a959b948c05e18deaf55aeefad2
Reviewed-on: https://chromium-review.googlesource.com/c/1322709
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606002}
fs
Need to walk ancestors when text descendants of LayoutSVGText changes
In LayoutSVGText::InvalidatePositioningValues - which is called when a
number of different modifications to text is performed - we only flagged
the node itself for layout/paint invalidation. We also need to walk the
ancestor chain in case the text is a descendant of a resource.
(A <clipPath> in this specific case.)

Bug: 901851
Change-Id: Ia70860107616496e979c43a1d1a681def8b8c206
Reviewed-on: https://chromium-review.googlesource.com/c/1320069
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#605789}
bratell
Use not_needed() rather than asserts to avoid warnings in jumbo.gni
gn has a function not_needed() intended to avoid "Variable is not
used" errors in gni files. So far the code has used asserts for the
same purpose but it is better to use the function intended for the
purpose.

Change-Id: I5ec7e50c4089b265e104aaede24d0e4e50452cef
Reviewed-on: https://chromium-review.googlesource.com/c/1314588
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#605338}
fs
Remove Settings::is_shadow_page_ and its setter/getter
The referenced bug seems to be fixed, and nothing seems to read the
flag (anymore.)

Change-Id: I9975182364e9344e2dde88cb70211e78b10b69c1
Reviewed-on: https://chromium-review.googlesource.com/c/1314634
Reviewed-by: Luna Lu <loonybear@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#605222}
bratell
GetClassName is a Win32 macro, use a different name in AXVirtualView
In jumbo builds, AXVirtualView::GetClassName sometimes expanded to
AXVirtual::GetClassNameW (but not always). This caused build breakage.

Rather than carefully ensuring that ui/views/accessibility is compiled
with the same GetClassName macro every time (be it defined or
not defined), just rename it to get the build going.

If the undef method is to be used, it needs be in the header file, but
then it will also affect View::GetClassName and that is another can
of worms. It's possible GetClassName should be added to
base/win/windows_types.h which could be used everywhere, but that
is a larger fix than just getting the build working again.

TBR=nektar@chromium.org,dmazzoni@chromium.org

Bug: 811277
Change-Id: I8e5a8b71f21d57ef03a5c5e58bee84b5b99b2abd
Reviewed-on: https://chromium-review.googlesource.com/c/1314488
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#604892}
bratell
[jumbo][extensions] Give two kPrefsName unique names
In jumbo builds many cc files compile in the same translation unit
which also means that they share the same anonymous namespace. That
means that constant names need to be unique in the whole build
target even if they are in anonymous namespaces.

A service worker extension just introduced a second kPrefsName into
extensions/browser which broke some (but not all) jumbo build
configurations. This patch renames them both to prevent
confusion (from compiler or human).

TBR=lazyboy@chromium.org,rdevlin.cronin@chromium.org

Bug: 889687
Change-Id: I6d3d44d9941038cc8e2304bc3100c7e681ea18a9
Reviewed-on: https://chromium-review.googlesource.com/c/1314468
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#604882}
bratell
Do more gn check of third_party/*
More of third_party/* has been made gn check clean and this CL
enables it for another 14 directories. Most (but not all) of the
rest look non-trivial.

Bug: 898837
Change-Id: I95c7348d8c1fa0bf85e0345aaaa9228f971a300e
Reviewed-on: https://chromium-review.googlesource.com/c/1309743
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#604365}
bratell
[jumbo] Give two GetPromoStringSpecifier() functions unique names
In jumbo builds many cc files compile together in the same
translation unit and then they share the same anonymous namespace.
That means that within a (jumbo) build target, also symbols in
anonymous namespaces need (build target) unique names.

In a recent patch, two GetPromoStringSpecifier functions appeared.
They are almost identical but not quite, so this patch just
gives them unique names to make all jumbo build configurations
happy again. Most jumbo build configurations were already happy
because the relevant files did not easily end up in the same
jumbo chunk.

See https://chromium-review.googlesource.com/c/1298394

TBR=collinbaker@chromium.org,bsep@chromium.org,nyquist@chromium.org,robliao@chromium.org

Change-Id: I5f244fc6a4e5b2047f2fdb443d0e40565c8bc103
Reviewed-on: https://chromium-review.googlesource.com/c/1309739
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Robert Liao <robliao@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604284}
fs
Fix ancestor bounding box for "disabled" <foreignObject> and <image>
Per:

 "A value of zero for either width or height disables rendering of the
  element and its embedded content."

 (https://svgwg.org/svg2-draft/embedded.html#Placement)

and:

 "For each descendant graphics element child of parent:
  * If child is not rendered then continue to the next descendant
    graphics element."

 (https://svgwg.org/svg2-draft/coords.html#BoundingBoxes)

<foreignObject> / <image> with 'width' or 'height' zero should not
contribute to an ancestor container's bounding box.

Bug: 643493
Change-Id: I097d9d28faaa52fc793dab251f22bc7b2610d6ad
Reviewed-on: https://chromium-review.googlesource.com/c/1309773
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#604276}
bratell
[zlib] Make build system pass gn check
There are some circular include dependencies in the zlib
build system because some parts are extracted into their
own targets. To make gn check understand that, those targets
need to be added to the allow_circular_includes_from list.

Bug: 898837
Change-Id: Ic94c5f5ac88e10792b458f4d734c4ad0487023c2
Reviewed-on: https://chromium-review.googlesource.com/c/1299135
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#604210}
bratell
Move cacheinvalidation testing file to a testing build target
This allows third_party/cache_invalidation to be checked
with gn check (as soon as it's enabled in //.gn).

Bug: 898837
Change-Id: Ica669d8a7277178878d630b54879e1439350f566
Reviewed-on: https://chromium-review.googlesource.com/c/1307496
Reviewed-by: Nicolas Zea <zea@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#604196}
bratell
Correct abseil dependencies to make it possible to run gn check
//third_party/abseil-cpp is currently excluded from
gn check because of a couple of dependency fails. This patch
tries to fix those.

Most complicated is the dependency to gmock. The code does
include "gmock/gmock.h" which gn will see as a dependency on
//third_party/googletest:gmock.

Bug: 898837
Change-Id: I2c1d33935511e790e1343cb59db11908cf4fab15
Reviewed-on: https://chromium-review.googlesource.com/c/1307497
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603976}
bratell
Removing dependency from blink/public to media/base
There is no reasonable target to depend on to get access
to media/base/video_rotation (depending on all of //media
seems to be the only way) so to clean up dependencies from
blink/public, forward declare the enum.

Better solutions are welcome.

Bug: 800764

Change-Id: Ic5079fbb11c6be189a3fc658ea9d10764c0149e5
Reviewed-on: https://chromium-review.googlesource.com/c/1301521
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603854}
bratell
Moving common_export.h to blink's public folder
common_export.h was kept out of public since it was not to be
directly included by users of blink's public API but that made
dependency tracking unnecessarily complicated and it was included
indirectly anyway since many public headers included it.

This patch moves the header to blink's public/common. It's still
not to be include by external blink API users, but there is also
no reason for them to do it. This allows us to remove the dependency
hacks and makes dependency checks easier.

Bug: 800764

Change-Id: I834f389f9c1871a5e1e66b2fa69477b7eb40e0a0
Reviewed-on: https://chromium-review.googlesource.com/c/1301467
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603654}
fs
Use clampTo<int> in SVGInteger::CalculateAnimatedValue
Matches what we do in SVGIntegerOptionalInteger::CalculateAnimatedValue,
and avoids undefined overflow.

Bug: 899445
Change-Id: I1250a05482713780f707301ed29e015fd81e65f2
Reviewed-on: https://chromium-review.googlesource.com/c/1304483
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#603548}
bratell
Remove non-existing headers from openh264 sources list
openh264 sources lists referred to two non-existing headers which
prevented gn check from successfully working on that code. This
patch removes those headers from the sources list. One of them
(utils.h) does exist but with another path, and it's already included
with that path,

Change-Id: Ie0a1e7e0b48295a28e9a89651e07800a70a36154
Reviewed-on: https://chromium-review.googlesource.com/c/1298956
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603483}
fs
Add use counter for SVG geometry properties unitless values
Add the kSVGGeometryPropertyHasNonZeroUnitlessValue use counter for
non-zero unitless (<number> / "user units") values in the 'x', 'y', 'r',
'rx', 'ry', 'cx' and 'cy' properties.

Bug: 899074
Change-Id: I1a7e6cdce018a75ed46745ec245dabcaed5ea954
Reviewed-on: https://chromium-review.googlesource.com/c/1301597
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#603454}
bratell
[jumbo] resolve ::switches / ::extensions::switches confusion
There is both a top level namespace ::switches and a sub
namespace ::extensions::switches so inside extensions,
if both namespaces are known to the compiler, you need to
clarify which one you want. This is the reason the code
style guide prohibits sub namespaces with the same name as
common top level namespaces.

This is a quick fix to make some jumbo builds happy. I am not sure
exactly what commit triggered this, but it can easily happen just
by adding an include somewhere.

TBR=hubbe@chromium.org

Change-Id: I22d742aa1645aa1b37317524e9b1aa18e91d2fd3
Reviewed-on: https://chromium-review.googlesource.com/c/1303362
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603452}
bratell
Remove s2.h from s2cellid sources lists
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I656a0a2f3aeaded7cace52ebc39cf80e1907163b
Reviewed-on: https://chromium-review.googlesource.com/c/1288872
Reviewed-by: Jia Meng <jiameng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603437}
bratell
Delete unused WebCanonicalCookie::BuildCookieLine()
The BuildCookieLine() function violated layering by using
internal blink types in the blink public API but since it
wasn't used anyway it can just be deleted.

Also hide the export include from gn since it's an ugly
exception, just for debug component builds.

Bug: 800764

Change-Id: I7381e68f801e6037667d254d690faa376461e9da
Reviewed-on: https://chromium-review.googlesource.com/c/1301469
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603371}
bratell
Remove dependency from blink/public to webrtc/p2p
As part of making blink/public's dependencies automatically
checked by gn, this is one dependency that was unintended and
unnecessary. Moving the dependency into platform/export makes
for a cleaner API.

Bug: 800764

Change-Id: I4e5f2095bddc4e51de08ed16db51c248884dfd5f
Reviewed-on: https://chromium-review.googlesource.com/c/1301468
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603370}
bratell
Remove WebThread code violating dependency rules from blink/public
blink/public can't depend on internal blink code but luckily
the code that was violating this was unused so it could just be
deleted.

Bug: 800764

Change-Id: Id487e43362931677e93e15d736e7e74922103be0
Reviewed-on: https://chromium-review.googlesource.com/c/1301522
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603369}
bratell
Updated the .gn check_targets list to include all* of third_party/*
gn check by default only works on those targets that are listed in
check_targets, and since we can't whitelist all of //third_party,
every sub-folder has to be individually listed. Some were listed
before but this adds another two hundred.

5-10% of the folders are still excluded because they have one or
more internal check problems. Specifically third_party/blink is
not included yet. Working on it.

Bug: 898837
Change-Id: Ia2a2cc14c00ecfdb956eb553664efe46356dedc3
Reviewed-on: https://chromium-review.googlesource.com/c/1299086
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603156}
bratell
Making it (almost) possible to gn check blink/public/*
Mostly it's about marking includes inside INSIDE_BLINK as
// nogncheck

Also some added dependencies on for instance //media to cover
an include of "media/base/video_rotation.h" and on various
mojo headers.

There are five errors left which look like real layer violations.

Bug: 800764
Change-Id: Ie63283def2dadc6c0b5933175551e9addb9da5ec
Reviewed-on: https://chromium-review.googlesource.com/c/1299142
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603072}
fs
Remove 'using' directives in web_idb_cursor_impl_unittest.cc
All of the 'blink::*' directives should be unnecessary (now that the code
is within Blink.) Remove the testing::StrictMock 'using' too, and just
"expand" it at its single usage point.

Change-Id: I3171d05f41364fa134c2ee781e93178d831d4eab
Reviewed-on: https://chromium-review.googlesource.com/c/1301458
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603049}
fs
[jumbo] Remove 'using' declaration for mojom::blink::IDBCursor
The lone 'IDBCursor' can collide with the blink::IDBCursor. Remove the
'using' and specify the namespace instead.

TBR=pwnall@chromium.org

Bug: 717812
Change-Id: I092b6d3c30931f45d13fd5c35af24539884fa686
Reviewed-on: https://chromium-review.googlesource.com/c/1301434
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603039}
bratell
Correct the spelling of a file in libxslt's sources list
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I1bef29f477965e254e955970b1ab2471eb956f66
Reviewed-on: https://chromium-review.googlesource.com/c/1288870
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602810}
bratell
[ppapi] undef MemoryBarrier on Windows to avoid atomicops clash
MemoryBarrier is a macro in some versions of the Win32 API and it's
also a name in the base/atomicops.h API. If windows.h is included
after atomicops.h, further use of the atomicops API will fail
unless MemoryBarrier is undefined. See base/atomicops.h for more info.

Bug: 898475
Change-Id: I4a4be93d534f54a5758dc09d1b1e52c1f2bee79c
Reviewed-on: https://chromium-review.googlesource.com/c/1299139
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602793}
bratell
Correct a header path for sync.h in libsync
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I37b2cff42454a5f4c49eb947289c279701639868
Reviewed-on: https://chromium-review.googlesource.com/c/1288972
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602773}
bratell
[flatbuffers] Make build system pass gn check
There were some broken dependencies that gn check reported
errors for which were easily fixed by moving relevant headers
to :flatbuffers. The other targets depend on :flatbuffers so
they can still use those headers.

Bug: 898837
Change-Id: I259a7e5d781ea17e667b6e6469a1133e875ec7b8
Reviewed-on: https://chromium-review.googlesource.com/c/1299137
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602753}
bratell
[libaddressinput] Make build system pass gn check
There were some missing headers that gn check found in
third_party/ced instead (string_util.h is a common name) and
then complained that libaddressinput can't include files from
third_party/ced. This adds those headers and some more.

It doesn't add the public headers since those have no natural
position in the dependency tree (used externally, and by util).

Bug: 898837
Change-Id: Iec0d622c0da861d149f86267eebafa63221d3906
Reviewed-on: https://chromium-review.googlesource.com/c/1299000
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602712}
fs
Insert an error message block when parsing was stopped after an error
The <parsererror> element was not being added to the parsed document in
certain cases involving attribute parsing. For example, if an undeclared
namespace prefix was used in the document, then parsing would stop, but
a <parsererror> element would not be inserted into the document to
indicate that a parsing error occurred.

When XMLDocumentParser::StopParsing() is called to stop parsing, call
InsertErrorMessageBlock() to insert the <parsererror> element if an
error occurred.

Based on https://codereview.chromium.org/771493002/ by dtrebbien@gmail.com

Bug: 295809, 898775
Change-Id: Ic67a3ab885fae4b01ca92f6d927b3f523f7423ed
Reviewed-on: https://chromium-review.googlesource.com/c/1224791
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602674}
bratell
[ppapi] Renamed two global variables and types in ppapi/proxy
In jumbo build experiments, the different
InstanceToDispatcherMap types and g_instance_to_dispatcher
globals ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. This just renames
them as Dispatcher -> PluginDispatcher/HostDispatcher.

Bug: 898475
Change-Id: Ieae4310fdbe7ea27954011964d2bb6fa4d83e338
Reviewed-on: https://chromium-review.googlesource.com/c/1297145
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602647}
bratell
[ppapi] Merged three RunCallback methods doing the same thing
In jumbo build experiments, the different RunCallback functions
ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. Since they,
and VideoDecoderResource::RunCallbackWithError had the same
implementation, this merges the functions into a shared
SafeRunCallback.

Bug: 898475
Change-Id: I3ee20972794d3c6ef73e49882e1ceba24c487e19
Reviewed-on: https://chromium-review.googlesource.com/c/1297427
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602646}
bratell
[jumbo] Change how jumbo.gni handles headers in sources
Up until now headers were removed from |sources| and then
reinserted. Cleaner/easier is to never remove them from the start.

Change-Id: I8f7560ef96f409880647e2924c2f71317f519468
Reviewed-on: https://chromium-review.googlesource.com/c/1290969
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602363}
bratell
Adding bratell@opera.com as owner of build/config/*jumbo*
Original developer and main maintainer.

Change-Id: Ia7eacd431f2d83c30ffb5231745b8fcfab8ebd21
Reviewed-on: https://chromium-review.googlesource.com/c/1297135
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602362}
bratell
[jumbo] Rename one of the OnNetworkServiceCrashed methods.
In jumbo builds, many cc files compile in the same translation
unit which means that they also share the same anonymous namespace.
This makes it necessary for constants and global scope functions
to have names that are unique in the build target.

This particular error only happens in extreme jumbo (many files
compiled at once) and not the more modest jumbo configurations
(8-50 files compiled at once) I think.

Change-Id: I86d15bcfd5c55db9592cb9423943d2e46b8f2e5c
Reviewed-on: https://chromium-review.googlesource.com/c/1297361
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602359}
fs
Update isPointInFill/isPointInStroke to match spec adjustments
Rather than using the value of the 'pointer-events' property (and
indirectly, the 'visibility' property and potentially others not
explicitly listed in the spec), pass 'fill' and 'stroke' respectively to
better match spec [1].

Use AsPath() in isPointIn{Fill,Stroke} instead of going to the
LayoutSVGShape, to hopefully allow the LayoutSVGShape to be stricter
about invariants.

[1] https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement

Bug: 896638
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I4f8ef5ae4e84d29187e68ca243e3344a9a27544c
Reviewed-on: https://chromium-review.googlesource.com/c/1288574
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602018}
bratell
Fix spelling of crazy_linker_system.h in a sources lists
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I030e6068e857de2957b4e20a3e53fc26af3017a8
Reviewed-on: https://chromium-review.googlesource.com/c/1288873
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601909}
fs
An <img> with no 'src', no 'alt' but 'srcset' represents nothing
Based on [1], it would seem that we should treat the case where we have
no image candidate as representing nothing - this apparently also
matches what other UAs do.

Simplify the NoImageSourceSpecified helper function a bit. (IsNull
implies IsEmpty and !hasAttribute.)

[1] https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:the-img-element-5

Bug: 897033
Change-Id: I37ecad8faea2b929e8cf35ce7c746313b2d3b915
Reviewed-on: https://chromium-review.googlesource.com/c/1293574
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#601648}
bratell
Remove duplicate plugin header in sources list
pepper/fullscreen_container.h sometimes appeared twice in
the sources list. This confused some other tools so it seems
like a good idea to only have it there once.

Change-Id: I02d88c68c6581eadb171ca5a5d72f75281c52717
Reviewed-on: https://chromium-review.googlesource.com/c/1293455
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601550}
fs
Plumb HitTestLocation further in LayoutSVG*
Plumb HitTestLocation into clip-path handling and
LayoutSVGShape::*Contains.

Change-Id: Ibd4e433e868ac427e637f906ff3d778fd33e1a80
Reviewed-on: https://chromium-review.googlesource.com/c/1291409
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#601413}
bratell
Remove duplicate header wtf/test/string_statics.h from sources list
A header appeared twice in the sources list which confused some
other tool. Seems like better to have it there only once.

Change-Id: If713c5a241fab6e8fb30705240bc534e0598f704
Reviewed-on: https://chromium-review.googlesource.com/c/1290909
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601331}
bratell
Remove deleted file ssl_validity_checker_android.h from build system
The file payments/android/ssl_validity_checker_android.h was
removed when the JNI registration code changed but it remained
in the sources list, where it ended up causing some unrelated
problems so here it goes.

Bug: 683256
Change-Id: I7e57af91ad5848c73d814fc4b89712d106ecf358
Reviewed-on: https://chromium-review.googlesource.com/c/1290271
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601328}
bratell
For ios, only compile the necessary parts of //ipc.
Until recently ios didn't use //ipc but //services/network
needs some small parts of them. Some of the rest of the ipc
code won't even link in ios since ios has no
discarding some unused object files before noticing they referenced
non-existing symbols.

base: :WaitableEventWatcher. It's built so far thanks to the linker
Change-Id: Ieaf3749e1b4f0d8f46f652248b839ae9e8650282
Reviewed-on: https://chromium-review.googlesource.com/c/1273498
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601218}
bratell
Remove headers in mojo and data_decoder sources list
Some headers appeared twice in some sources list. This confused
some other tools so it seems like a good idea
to only have them there once.

Change-Id: Ifa0c7b2e0fbb8b7ec401bad2737384cffa3d940a
Reviewed-on: https://chromium-review.googlesource.com/c/1290949
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601177}
bratell
Remove duplicate headers from base sources list
allocator/allocator_shim.h and base/base_paths_posix.h were
in base's |sources| list twice each in some configuration.
This removes the duplicates since that confused some tools.

Change-Id: I0dfbf796a73ce28fd66352afe0651e61058506eb
Reviewed-on: https://chromium-review.googlesource.com/c/1290910
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601139}
bratell
Fixed misspelled references to browser_switcher headers
Some isolate step errors in trybots mentioned these non-existing
headers so hoping the trybots will be happier, this patch removes
and changes the names to point to existing files.

Bug: 881589
Change-Id: I6c7728110a9ce162293c57606824140cdacd8d38
Reviewed-on: https://chromium-review.googlesource.com/c/1286660
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601133}
bratell
Headers in :make_core_generated_css_value_id_mappings appeared twice
The target :make_core_generated_css_value_id_mappings was listed
twice which made its output be twice in some sources lists. This
confused some tools. Seems better to only have it there once.

R=fs@opera.com

Change-Id: I1da2cfbda7021fa5262d0c0a74b894989fc200de
Reviewed-on: https://chromium-review.googlesource.com/c/1290929
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601105}
fs
Add TransformedHitTestLocation helper
This moves code for transforming a HitTestLocation using with an
AffineTransform from the helper function
SVGLayoutSupport::TransformToUserSpaceAndCheckClipping into a helper
class TransformedHitTestLocation.

Calls to SVGLayoutSupport::IntersectsClipPath are hoisted into callers
and SVGLayoutSupport::TransformToUserSpaceAndCheckClipping is removed.

Change-Id: I52f95ba2480df86a509285c2ec2edea776517bc6
Reviewed-on: https://chromium-review.googlesource.com/c/1282930
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#601099}
bratell
Remove aes_via_ace.h from the the minizip sources lists
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I5db5e075cf4d01783fb44660ee008ea0fa9a26c6
Reviewed-on: https://chromium-review.googlesource.com/c/1288871
Reviewed-by: Yuki Awano <yawano@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601091}
bratell
Clean some harfbuzz-ng sources lists from headers that are gone
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

This is mostly that harfbuzz-ng has stopped using the suffix
"-private" on headers.

Change-Id: I6f3bd45378b011c8ea33fa98053c507fbdc68ed2
Reviewed-on: https://chromium-review.googlesource.com/c/1288791
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601089}
fs
Generalize computation of stroke bounds for LayoutSVGShape
Store the (stroke) geometry class in the LayoutSVGShape. This allows us
to compute stroke bounds in a slightly less "context-aware" way. This is
a step on the way to break up UpdateShapeFromElement into several steps.

We can also get rid of LayoutSVGPath::HitTestStrokeBoundingBox since we
now carry the information it provided in the geometry class.

The geometry class also replaces the LayoutSVGShape::affected_by_miter_
so it is removed, and replaced with a new kNoMiters class type.

Bug: 435097, 493888
Change-Id: I422b72451c6cea8045dea547a500984863e83a8d
Reviewed-on: https://chromium-review.googlesource.com/c/1288359
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601081}
bratell
Remove references from blink/public to non-existing headers
An android specific block in BUILD.gn kept some references to
files that no longer existed after a cleanup in
https://chromium-review.googlesource.com/896839

This caused some local issues with trybots so it was time to
clean up the build files. Bye unnecessary code block.

Bug: 808221
Change-Id: I29ff4fc149fe408bd2a97517fbc338b408d13e7d
Reviewed-on: https://chromium-review.googlesource.com/c/1290272
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601073}
bratell
Remove discard_reason.h from chrome sources lists
The file discard_reason.h was deleted when its content
moved into a mojom file in
https://chromium-review.googlesource.com/1176267 but
it was not removed from the sources lists. This caused
some local problems with trybot servers so here it goes.

Change-Id: I873bc5e643c87f83197b4f0512d2859371c1e005
Reviewed-on: https://chromium-review.googlesource.com/c/1288794
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601065}
bratell
Correct the path of some woff2 headers in sources lists
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: Ie643b34a044b927021ce8ad2774568973c328a3c
Reviewed-on: https://chromium-review.googlesource.com/c/1288793
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#601061}
bratell
Correct spelling of a crc32c header in BUILD.gn.
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

Change-Id: I5bfe35139a41ab5d88aca564b1f7a2ded5ebab06
Reviewed-on: https://chromium-review.googlesource.com/c/1288971
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600818}
bratell
Clean some blink sources lists from headers that are gone
Not all sources lists have been kept up to date with code
movement/removal and it seems to make some isolate steps in
cq sad for some CLs (mine).

R=haraken@chromium.org

Change-Id: I2657e05f5df6079f4b493ea9a7df8ee6bbdbf544
Reviewed-on: https://chromium-review.googlesource.com/c/1288970
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#600817}
fs
Refactor computation of stroke bounds in LayoutSVGShape
Move all stroke bounds related computations into the
CalculateStrokeBoundingBox() method in LayoutSVGShape. Add a new enum
StrokeGeometryClass, and pass that as an argument to the method.
Currently all callsites use a constant argument value. This will be
modified in a future CL.

Split out computation of the bounds for non-scaling-stroke into a new
method CalculateNonScalingStrokeBoundingBox().

Also fold LayoutSVGShape::CalculateObjectBoundingBox() since it only has
a single caller.

Bug: 435097
Change-Id: I538b31f98dc7f0777e2538ef74b5e3553b435a7f
Reviewed-on: https://chromium-review.googlesource.com/c/1276770
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600733}
fs
Remove ImageObserver::AnimationAdvanced
This is only called from test-code, and thus is dead in practice.
Replace uses in test-code with the the Changed() method.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9cdf92314140e65c30bc2a901d34345bf128392d
Reviewed-on: https://chromium-review.googlesource.com/c/1286813
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#600538}
bratell
Removed webdatabase/BUILD.gn references to deleted headers.
In February a number of obsolete header files were deleted but
some of them were still listed in sources lists. That might have
caused isolate step errors in trybots.

Bug: 778580
Change-Id: Ica026a5d157c64f07465f520a15ed2ffab92c234
Reviewed-on: https://chromium-review.googlesource.com/c/1286428
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#600492}
fs
Split out HitTestFragments from SVGInlineTextBox::NodeAtPoint
We can only ever hit the same Node in this loop, so even if the query
is penetrating/list-based we won't add more to the result if we would
happen to hit multiple fragments.

It's also easier to read and maybe slightly faster in some cases.

Change-Id: I3ce41ce58ef4a188d948690b1840d66e20ac0631
Reviewed-on: https://chromium-review.googlesource.com/c/1277792
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#600479}
bratell
Removed reference to deleted scheduler/util/thread_type.h
scheduler/util/thread_type.h was deleted in January but the
reference to it in BUILD.gn remained. Now that seems to make
the isolate step in trybots sad.

Bug: 776416
Change-Id: Iff685c54def879a8c5a53c9893f1c7eef4c9c13c
Reviewed-on: https://chromium-review.googlesource.com/c/1286851
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600455}
bratell
Removed reference to deleted speech_recognition_client.h
In chasing isolate step errors in trybots, this is removing some
dangling references from a BUILD.gn file (though it seems to be
a never-ending sequence of problems so whatever started generating
the isolate step errors should probably be reverted).

Bug: 781655
Change-Id: I09f530fa4a1e1cf3e1c0f15125eb8d9886f1038b
Reviewed-on: https://chromium-review.googlesource.com/c/1286818
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#600448}
bratell
Create a windowsx_shim.h for windowsx.h patching
Despite existing undefs, windowsx.h macros cause troubles with
some jumbo builds. We can add more undefs, or we can change
approach to this, a windowsx_shim.h that solves the same
problem at one place instead of many.

The macros that have caused the most problems are IsMaximized,
IsMinimized and IsRestored which are common names to use in
code that manages windows.

Change-Id: Ib5f429aaeca4c35962c17a9973274e486b510c2f
Reviewed-on: https://chromium-review.googlesource.com/c/1280429
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#600422}
bratell
Removed BUILD.gn reference to non-existing void_callback.h
The file void_callback.h has never existed but there was
a VoidCallback.h in third_party/WebKit until February this year
when it was deleted in a cleanup.

This might have triggered isolate step errors on trybots.

Bug: 778580

Change-Id: I659c7ec456a8c21a274d1743d701061c798c7ace
Reviewed-on: https://chromium-review.googlesource.com/c/1286811
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#600418}
tmoniuszko
Add missing include to chrome_authenticator_request_delegate.cc
ListPrefUpdate is used in this file. It fails to compile with some build
configurations.

Change-Id: Icebb5b6f0ab59d4fad05ce3c1d2b6b64225f77ea
Reviewed-on: https://chromium-review.googlesource.com/c/1286467
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600367}
bratell
[jumbo] Merge two identical kFaviconsPerCategoryImage constants
In some jumbo build experiments (not official) there was an
identical constant in two explore_sites files. In jumbo builds
many cc files are merged into one translation unit for much
faster compilation.

This moves the constant to a header where it can be reused.

Change-Id: Id460645a39d69999bf2227c25651d1149f1a6d6c
Reviewed-on: https://chromium-review.googlesource.com/c/1275895
Commit-Queue: Justin DeWitt <dewittj@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600172}
fs
Remove redundant hit-testing result handling in LayoutSVG{Container,Root}
The children/leaves (LayoutSVGShape et al) will handle this.
Cf. LayoutBox::HitTestChildren.

Move the code to SVGLayoutSupport::HitTestChildren, and share that
between the two users.

Change-Id: Ibad76d35d90b2738cc3b840e0762147ef5098b4d
Reviewed-on: https://chromium-review.googlesource.com/c/1278401
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#599832}
fs
Path2D.addPath should throw if DOMMatrix validation fails
Step two of [1], invokes [2], whose step 1 invokes [3], which says to
throw a TypeError if the dictionary is not "well-formed".

Also remove some dead code in DOMMatrix/DOMMatrixReadOnly and remove few
unused includes of svg_matrix_tear_off.h.

[1] https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d-addpath
[2] https://drafts.fxtf.org/geometry/#create-a-dommatrix-from-the-2d-dictionary
[3] https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup-2d

Bug: 895244
Change-Id: Icd3f7058ce945d761ab7128e294ccc2e3fd3a879
Reviewed-on: https://chromium-review.googlesource.com/c/1278789
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#599723}
fs
Replace ShapeValue::IsImageValid with StyleImage::CanRender
The former looks like an open-coded version of the latter. Using the
latter will be more consistent (and future-safe.)

Change-Id: I3353d0181201df681779575d78fe0df22065a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1280447
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#599691}
bratell
Unduplicate GetHitTestQuery helper method.
Quickfix to resolve some jumbo build problems after a duplicate
instance of the GetHitTestQuery function was added.

Change-Id: I924ff8254e59d00a92170d09664c20328209103a
Reviewed-on: https://chromium-review.googlesource.com/c/1256688
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599628}
fs
Rename SVGLayoutSupport::PointInClippingArea to IntersectsClipPath
This function specifically checks only the shape(s) defined by the
'clip-path' property. It will also learn to handle more than just points
in the near future.

Change-Id: Icae665ff000ed5da2f7b0c5fad77411c856d176b
Reviewed-on: https://chromium-review.googlesource.com/c/1278402
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#599627}
bratell
Prepending switches by :: to not clash with safe_browsing::switches
There is both a ::safe_browsing::switches namespace and a ::switches
namespace. If you inside the safe_browsing namespace write |switches|
it will map to ::safe_browsing::switches if that namespace is known to
exist. In some jumbo builds where many cc files are compiled together
the compiler knows about that namespace and chooses it wrongly.

There is a style guide instruction to not use sub namespace names that
are identical to top level namespace names, probably for this reason,
so maybe all sub namespaces named |switches| should be given new
names, the same way that has already happened to some |features|
namespaces.

This patch is a small trivial fix, add a :: prefix to |switches| to
make it clear which |switches| namespace is intended.

Change-Id: I2f39ca26b2174455b94eeadd8b6cfb756248a6c9
Reviewed-on: https://chromium-review.googlesource.com/c/1278729
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#599595}
bratell
Adding a const to a static char array
When a different static char broke the build (for unrelated
reasons), I looked through the tree for other static chars without
const. This was the only other one outside third_party and tests.

It's possible the generated machine code is the same, or it might
become better this way. Depends on the compiler/linker/OS.

Change-Id: I11a75cda4de25d468357f36e1afb23c79460ace8
Reviewed-on: https://chromium-review.googlesource.com/c/1278730
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599241}
ckulakowski
Set proper permissions for package's framework directory.
Bug: 893616
Change-Id: I09d5d906c3cb2e075e142a36b3ebe9b6532eb11f
Reviewed-on: https://chromium-review.googlesource.com/c/1271001
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599218}
fs
Enable ZoomAndPan in an "SVG document" without an <svg> document element
Disabling zoom and pan in this (odd special-)case leads to some weird
behavior, so just enable it instead to avoid confusion.

This takes care of one of the testcases mentioned in the referenced bug,
but does not address the real issue in any way.

Bug: 222786
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I25d9cbf9cd10c1631d64fddcd133014b9602bcba
Reviewed-on: https://chromium-review.googlesource.com/c/1275886
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#598756}
bratell
[jumbo] Give two kNodeNumberLimit constants unique names
In jumbo builds many cc files compile together in the same
translation unit, and thus share the same anonymous namespace.
That means that constants need to have unique names in the
whole build target, and not just unique in the file.

This renames two constants, one that was just added/copied and
one that already existed to give them more descriptive, and
unique, names.

TBR=maxlg@chromium.org,skobes@chromium.org

Bug: 893068
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I45ec9852370fb5572fd53e21136a21f1dd14e220
Reviewed-on: https://chromium-review.googlesource.com/c/1275891
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#598730}
bratell
Remove impossible mojo/public/cpp/system file from nacl build
file_data_pipe_producer.cc refers to the base::File::File(path, flags)
constructor which does not exist (dangling symbol) in nacl builds. It
can work anyway if the whole object file is unused and gets ignored
by the linker. That didn't happen in jumbo build experiments where
file_data_pipe_producer.cc was combined with other files before being
compiled.

So let's not compile dead code that would not be possible to link anyway.

Change-Id: I39de768fb241bee2111bd29a516c5973951cdbd0
Reviewed-on: https://chromium-review.googlesource.com/c/1268320
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#598357}
bratell
Prevent X509_NAME collisions between Win32 and OpenSSL
Both OpenSSL/BoringSSL and some Windows headers define X509_NAME and
to avoid problems, we have wrapped wincrypt.h in crypto/wincrypt_shim.h.

The Win32 header xpsprint.h turned out to indirectly include wincrypt.h
so it too needed special treatment to not cause clashes with OpenSSL/
BoringSSL. This occurred when compiling chrome/service/cloud_printing with
jumbo, where OpenSSL and printing/backend/win_helper.h ended up in
the same translation unit.

Change-Id: I0dab33a4692b76817bc51ed355dad48e7ebe829b
Reviewed-on: https://chromium-review.googlesource.com/c/1258163
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598290}
bratell
net test_support uses Mac Security functions so link against those
keychain_test_util_mac.cc uses for instance SecKeychainCreate
which is a platform function. If that usage survives all the way
to the linker and nobody else links against Security.framework,
there will be a linker error.

This patch adds a lib dependency so that the function will always
be found. Normally this works anyway because usage of
for instance SecKeychainCrete will be removed before the linking
step thanks to dead object file removal.

Change-Id: I80bb38a2d2d79a7df525ab8c8ab90fcfeb12761f
Reviewed-on: https://chromium-review.googlesource.com/c/1268242
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#597982}
bratell
Add a comment to generic_stop.icon to explain why it's not stop.icon
The file was added as stop.icon which broke some builds, was
renamed generic_stop.icon to unbreak those builds.
See https://chromium-review.googlesource.com/c/chromium/src/+/1261042

R=estade@chromium.org

Bug: 877702
Change-Id: If90932dac4868053748e25f2d0f0dd15876087cc
Reviewed-on: https://chromium-review.googlesource.com/c/1269730
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#597928}
bratell
Renamed some duplicate symbols in Blink paint timing code
image_paint_timing_detector.cc and text_paint_timing_detector.cc
are similar and had identically named helper functions. This
broke some jumbo builds. This patch renames the helper functions
to have unique names.

Bug: 869924
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0a42ef4f647ea0b5bfb80bf9dc363a0650424efd
Reviewed-on: https://chromium-review.googlesource.com/c/1268135
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#597517}
bratell
Move crypto/wincrypt_shim.h to remove build dependency on crypto
The DEPS system and gn will enforce some kind of dependency on
//crypto if code needs to use crypto/wincrypt_shim.h. Now, that
header file will not in itself indicate a dependency on actual
code in //crypto so the dependency becomes a bit unexpected. By
moving it to base/win, code can avoid depending on //crypto just
to use that header file.

This became an issue when //printing needed to use wincrypt_shim.h

Change-Id: I68a3b8263da0d4307907a0b242444402675072a4
Reviewed-on: https://chromium-review.googlesource.com/c/1261024
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#597256}
bratell
Break up dependency cycle between search_engines and omnibox
In 2015 a dependency from search_engines to omnibox was created
and it's created a cycle that causes linking problems in some
ios+jumbo configurations. It works without jumbo because the cycle
will be part of a dead .o file which will be ignored by the linker.
With jumbo the .o file is not 100% dead anymore since dead and live
code will be mixed in it.

Bug: 488901
Change-Id: I4b36a1b4e9f46a2814d9562f288e55dadc63d9dd
Reviewed-on: https://chromium-review.googlesource.com/c/1254082
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597093}
fs
Avoid resolving the URL twice when initiating image loads
Rather than resolving the URL again during Task::Create, pass the KURL
resolved by ImageLoader::UpdateFromElement through.
Also move the resolution before the |loading_image_document_| special-
case.

Bug: 889183
Change-Id: I52ea65d1af96a5919e128f0623fa6bd9026850f7
Reviewed-on: https://chromium-review.googlesource.com/c/1254266
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#597071}
bratell
Avoid creating a local mojom namespace that confuses symbol lookup
A local mojom namespace meant that it became ambigious inside the
content namespace whether "mojom" meant "::mojom" or
"::content::mojom". This problem surfaced in jumbo build experiments
where the compiler knew about the ::content::mojom namespace. In
most builds the compiler only knows about ::mojom and then it
compiles.

Bug: 746953
Change-Id: Ifec37f45009693d7e41eb393ca9bbea136f884b2
Reviewed-on: https://chromium-review.googlesource.com/c/1256926
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#596665}
fs
Replace WebStringToGURL with KURL::operator GURL in NetworkUtils
This allows reusing the data from the KURL - i.e does not require
performing canonicalization again.

Bug: 889183
Change-Id: I10e5f9b3725a0fb25594bc6dbe61791bb3826fe9
Reviewed-on: https://chromium-review.googlesource.com/c/1257927
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#596663}
fs
Perform a cycle check on the <use> target up front
Rather than deferring the check until ExpandUseElementsInShadowTree
(which will fail if the initial target is an ancestor of the <use>),
just check for cycles directly in BuildShadowAndInstanceTree(), and
don't build the initial shadow tree if the cycle check fails.
Stop cleaning up the partial tree after ExpandUseElementsInShadowTree(),
and adjust HasCycleUseReferencing such that it detects cycles earlier
(not requiring a clone into the shadow tree before a cycle can be
noticed.)

Behavior-wise this means that we now don't clone a target subtree if it
will create a cycle. We will however abort cloning of nested <use> after
a cycle is detected.

Bug: 397525
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1b2c22bacb63d788509ec7984ac35357b84a3020
Reviewed-on: https://chromium-review.googlesource.com/c/1258065
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596652}
bratell
Rename some newly added k...Key constants that broke jumbo builds
The new extensions_internals_source.cc code used the same constants
as extension_basic_info.cc, and since in some jumbo builds those
files compile in the same translation unit, those clashed.

This is a quick rename to give the clashing variables unique names
to make builds happy again. An alternative solution would be to
reuse the variables if they have the same value (the linker will
(probably?) merge them anyway so probably no wasted binary size).

TBR=dbertoni@chromium.org,rdevlin.cronin@chromium.org

Bug: 891788
Change-Id: Ia7342f249c9bb0cdb6697e8be00413879b26d284
Reviewed-on: https://chromium-review.googlesource.com/c/1261104
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#596572}
bratell
kStopIcon is a constant in the OSX APIs so rename kGenericStopIcon
Jumbo Mac fyi builder broke when a kStopIcon was introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/1239010
because the OSX API has a kStopIcon in
.../MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Dialogs.h

This renames it to kGenericStopIcon to make the builds go again.

TBR=jrw@chromium.org,estade@chromium.org

Bug: 877702
Change-Id: Id6c675b539f8e3161ef322bf008174ec2911d4be
Reviewed-on: https://chromium-review.googlesource.com/c/1261042
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#596571}
fs
Avoid UTF-8->UTF-16 conversion in HashAndUTF8CharactersTranslator
The Translate() function can use the same check as Equal() to determine
if the string is ASCII-only. Saving a conversion from UTF-8 to UTF-16.

Bug: 889183
Change-Id: Ieffab05f34a1e4a2ef725e298e7f15e7ff14a3f8
Reviewed-on: https://chromium-review.googlesource.com/c/1257928
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596556}
bratell
Removing unused private field from Windows NSSDecryptor
Coding standard and compiler do not like unused private fields, but
sometimes they slip between the cracks until they trigger something:

In file included from gen/chrome/utility/utility_jumbo_1.cc:12:
In file included from .\../../chrome/utility/importer/firefox_importer.cc:26:
In file included from ../..\chrome/utility/importer/nss_decryptor.h:13:
../..\chrome/utility/importer/nss_decryptor_win.h(169,29):  error: private field 'PK11_CheckUserPassword' is not used [-Werror,-Wunused-private-field]
  PK11CheckUserPasswordFunc PK11_CheckUserPassword;
                            ^
1 error generated.

This removes the unsued field. Also removing an "explicit" to get past
presubmit checks.

Running presubmit upload checks ...

L: \src\clean_chromium\src\chrome\utility\importer\nss_decryptor_win.cc:18:  Zero-parameter constructors should not be marked explicit.  [runtime/explicit] [5]
Change-Id: Id310c0f65a406c1a47ec29312472580d15dfd1ce
Reviewed-on: https://chromium-review.googlesource.com/c/1259018
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596375}
mharanczyk
Override manifest handler registry in ManifestHandlerPerfTest.
MANUAL_CommonMeasureFinalization and MANUAL_CommonInitialize tests
reseted global registry on exit without initializing it again causing
random test flakes on tests that operated on manifests that happen to
run after those two tests (they passed on retry).

Change-Id: I2b4297d33441c72d9cdd099106abad68921c2f6a
Reviewed-on: https://chromium-review.googlesource.com/1259046
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596271}
fs
Restructure cycle checking in SVGUseElement
Hoist call to ResolveTargetElement() out of HasCycleUseReferencing(),
leaving the latter only checking for cycles.
Drop the InUseShadowTree() check from BuildShadowAndInstanceTree since
its single caller checks it already.
Use ToSVGElementOrNull to simplify the code a bit.

Bug: 397525
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idb6cbd9e155d6217db77ef97299e77fa57cd0d8d
Reviewed-on: https://chromium-review.googlesource.com/c/1257918
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#596202}
fs
Use StringUTF8Adaptor in KURL::operator GURL
This can save a conversion to UTF-8 (and copy to CString) for ASCII-only
URLs.

Bug: 889183
Change-Id: Ie5edad4a95da70bac0acd27b01d6e03cd1315bbd
Reviewed-on: https://chromium-review.googlesource.com/c/1257926
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596192}
bratell
Removing safe_browsing::features to not clash with ::features
According to the coding style guide a sub-namespace should not
have the same name as a common top level namespace. That still
happens with many "features" namespaces which causes problems
whenever the compiler knows about the root ::features namespace.

This patch removes the namespace completely and lets the
constants live in the safe_browsing namespace directly, making
the code a little shorter.

Another option would have been to rename the namespace from
::safe_browsing::features to ::safe_browsing_features like was
recently done to some other features namespaces, for instance app_list_features.

Change-Id: I3655cca7fb56b45a03118a80a957599bd5f316b3
Reviewed-on: https://chromium-review.googlesource.com/c/1251604
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596179}
bratell
Remove unused OptionMenuModel from components/translate
It was linked into some jumbo build experiments where it triggered
link errors.

If you include an object file, for instance options_menu_model.o, in
an archive, for instance libtranslate.a, and nothing references that
object file, then the linker won't care if options_menu_model.o is
referencing all kinds of undefined symbols. It's a feature or quirk
depending on who you asks.

With jumbo compilation this options_menu_model.o would be combined
with 7+ other .o files into translate_jumbo_1.o and since the .o file
is no longer completely unused, the linker will get upset about the
dangling references.

So something that used to be "just" dead code compilation with
dangling references becomes a linking error when compiling with jumbo.

Change-Id: Id15f7e15804efe2fdf959c4db7fdade061477102
Reviewed-on: https://chromium-review.googlesource.com/c/1256685
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596168}
fs
Fix wpt/css/css-masking/mask-svg-content/mask-text-001.svg
The test has fixed dimensions of 100x100 pixels - the reference does
not. Add same fixed dimensions to the reference to get the same clipping
behavior.

Bug: 890755
Change-Id: Ib3d12ad1f7ace05027b81b9c683158490ae116ab
Reviewed-on: https://chromium-review.googlesource.com/1256568
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#595936}
bratell
Include .h file instead of .cc file, fixing linking problem
In some builds there were duplicate symbols because a cc file
was compiled twice and linked with itself. This happened because
some code accidentally included the cc file instead of the header.

Change-Id: Ifa145ce13190a9fa855e06986ca60605005aa9fc
Reviewed-on: https://chromium-review.googlesource.com/1255824
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595853}
bratell
Rename a header so that it has the .h suffix
input_predictor_unittest.cc is used purely as a header file so
it should have the .h suffix. Now it looks like some .cc files
are trying to include another .cc file.

The class was too large to have an implicit inline
constructor/destructor so those remain in a cc file. This presubmit
check didn't work before because the file was named *.cc.

Change-Id: I67740f4181ea60d02cd3149ce57b0d4e8c36aaf2
Reviewed-on: https://chromium-review.googlesource.com/1255638
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595838}
bratell
Resolve conflicts between Win32 headers and OpenSSL
Both some Win32 headers and OpenSSL/BoringSSL defines some
constant macros like X509_NAME. To avoid that clash we have
a wrapper for <wincrypt.h>, crypto/wincrypt_shim.h Use that
one in chrome/chrome_cleaner/os/system_util.h too since
that header might be used close to OpenSSL code.

Change-Id: I678b5aa1658e8436eed4b431e6c2950ce7acfb3b
Reviewed-on: https://chromium-review.googlesource.com/1255825
Reviewed-by: Joe Mason <joenotcharles@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595820}
bratell
Avoid having two global GetInfo() methods in the same module
In jumbo builds a whole build target can compile together
and share the same anonymous namespace. Then two methods with
the same name and arguments will clash which happens in
chrome/common.

This resolves that clash twice over by giving one GetInfo a
longer name and inlining the other one since it was only used
once in a one line function.

Bug: 890323
Change-Id: Icbb1d768bdf9c1385f35bebd54d0d008e4be49d9
Reviewed-on: https://chromium-review.googlesource.com/1251603
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595765}
fs
Adjust SVGImageElement::InsertedInto to match HTMLImageElement
This does the same edit to SVGImageElement::InsertedInto as
https://chromium-review.googlesource.com/1141121 did to HTMLImageElement.

Bug: 864306
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I74696c16c27eba363e4965d996f3ae688ef27c91
Reviewed-on: https://chromium-review.googlesource.com/1254265
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#595507}
bratell
Resolve Windows conflict between zlib and angle
Windows normally defines macros so that FAR expands to far, and
far expands to nothing.

Angle undefs far, leaving the FAR macro hanging, expanding to far
which is not a legal keyword anymore. zlib already tries to handle
that someone/something has undefined FAR but it doesn't handle
that someone/something has undefined far. This patch changes that.

This problem appeared in some jumbo builds in
gpu/command_buffer/service which uses both angle and zlib.

Bug: 889429
Change-Id: Ia3b10a9a82fc51b302c67b24a19f30a73bdda489
Reviewed-on: https://chromium-review.googlesource.com/1245723
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595425}
fs
Include CSSPropertyID HashTraits in renderer/core/svg/svg_element.cc
SVGElement::CssPropertyIdForSVGAttributeName has a:

  HashMap<StringImpl*, CSSPropertyID>

which will require traits for the value (CSSPropertyID). Without Jumbo
this usually works out by using the default traits.

Bug: 890434
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I6ff50a0648106057dad898d1fe6d79e9a53a1bd2
Reviewed-on: https://chromium-review.googlesource.com/1253662
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595414}
fs
Fix WebP sniff pattern
The current pattern wouldn't be able to sniff the 'lossless' and
'extended' WebP formats.

Adjust the pattern to match the one described by [1].

[1] https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern

Bug: 889420
Change-Id: I4b5a73d4d9477502d58df7460b9494e6540a59f3
Reviewed-on: https://chromium-review.googlesource.com/1248782
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#595273}
bratell
Give two g_lazy_tls global variables unique names
In content/child there were two g_lazy_tls global variables
in two different anonymous namespaces. In jumbo build experiments,
where many files compile together and share anonymous namespace,
those globals collided. This patch gives them more distinct names.

Bug: 746953
Change-Id: Icac936f2092d1c8b1bc5de38d443d71cb8955045
Reviewed-on: https://chromium-review.googlesource.com/1251605
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595100}
bratell
[jumbo] One kInvalidId constant should be enough.
Jumbo compilation in components/sync broke when a kInvalidId
clone appeared with the same name. This build unbreaking patch
renames it to kInvalidNodeId. A longer term fix is probably to
move the constant to modules/sync/base or another shared location.

Regression from https://chromium-review.googlesource.com/c/chromium/src/+/1164742

TBR=mastiz@chromium.org,treib@chromium.org

Bug: 870624
Change-Id: Ie300cf3338c8ffb93a2a0b3b656838bdbf10248a
Reviewed-on: https://chromium-review.googlesource.com/1250965
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#595052}
fs
Use LayoutRect for frame rect in HitTestResultInFrame
This is consistent with how the frame rect is treated in other cases of
hit-testing (such as LayoutView::HitTestNoLifecycleUpdate). It also
eliminates the need for HitTestLocation::Intersects(const FloatRect&).
(The other "use" of this method is removed since it isn't used.)

Bug: 823796
Change-Id: I7532f0e685e9960d8afd16f9b41d699ae27bfd11
Reviewed-on: https://chromium-review.googlesource.com/1249142
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594795}
bratell
Removing unused field in DXVAVideoDecodeAccelerator
Some jumbo build configurations would not compile because of
the unused field. The are not allowed by the build system but
sometimes only jumbo builds notice such things since they
have access to more source code.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I079412fc98e5812f709b6566d02de9d91a5a8706
Reviewed-on: https://chromium-review.googlesource.com/1249485
Reviewed-by: Frank Liberato <liberato@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#594759}
bratell
[net] Don't compile RemoteTestServer for iOS since it's unused
Noticed because RemoteTestServer refers to BaseServer which
is not included in ios builds.

Change-Id: I006a32ca751dd8d9e3c3d6be6ece93f30e0bc992
Reviewed-on: https://chromium-review.googlesource.com/1244841
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594639}
fs
Remove marker handling from SVGResources::RemoveClientFromCache
Markers don't actually have any per-client caches, so all this code does
is trigger a call to SetNeedsBoundariesUpdate - but if a marker was
changed this flag would already be set. Hence worst case we may end up
updating more than need (update the shape when only the transform
changed for instance.) Not generally a huge deal, but also not good.

Bug: 225808, 534817
Change-Id: I4d958cbc700c101a471c4ced1d79591cd1f2ebc9
Reviewed-on: https://chromium-review.googlesource.com/1245709
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#594376}
bratell
[ios] Fix typo: include header instead of mm file.
This caused a link error, duplicate symbols, in a jumbo build
experiment. How it ever worked in normal builds we'll never know.

Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I4136a153aa989f2187d745f291658ac4e05fa6db
Reviewed-on: https://chromium-review.googlesource.com/1244461
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#594357}
fs
Pass oBB to SVGLayoutSupport::AdjustVisualRectWithResources
Most callsites have easy (even trivial) access to the object bounding
box (oBB), so just pass it as a parameter.

Change-Id: I2ec67dbea178356a3130bcef27204875143cf26c
Reviewed-on: https://chromium-review.googlesource.com/1245444
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#594300}
bratell
Add declaration for a newly defined highlight path property
A missing declaration broke some jumbo builds because in those
builds an implicit instantiation was seen before an explicit
specialization. This is illegal in C++. A forward declaration
solves the problem.

TBR=pbos@chromium.org,tapted@chromium.org

Bug: 861975,888204
Change-Id: Iecf736bcf9748d3c68265c21f9351c56d9a23dd8
Reviewed-on: https://chromium-review.googlesource.com/1245785
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#594289}
fs
Make LayoutSVGResource*::ResourceBoundingBox uniform
The LayoutSVGResourceFilter and LayoutSVGResourceMasker versions was
taking const LayoutObject* while the one on LayoutSVGResourceClipper
took a const FloatRect&. Align the two former with the later - thus
eliminating unnecessary dependencies on the client.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I26dcfb5ba9d164e4c5f97b9063cac8b6281cd6e6
Reviewed-on: https://chromium-review.googlesource.com/1243193
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594051}
fs
Remove dead code in SVGResources::RemoveClientFromCache
This method is never called for a LayoutObject which has a "linked"
resource (<pattern>), so remove the handling of |linked_resource_|.

Change-Id: I8c57804ecb58f4b7e286e427f0b7de84909286b8
Reviewed-on: https://chromium-review.googlesource.com/1243807
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#594041}
fs
Uninline unit-accessors in LayoutSVGResource{Clipper,Masker}
This uninlines MaskUnits() and MaskContentUnits() in
LayoutSVGResourceMasker as well as ClipPathUnits() in
LayoutSVGResourceClipper - reducing unnecessary includes/dependencies.
Also streamline LayoutSVGResourceFilter::ResourceBoundingBox a bit by
using the FilterUnits() accessor, and remove the redundant null-check on
the element.

Change-Id: I658b7626627ac38fc8b43bfd54630adb778233e8
Reviewed-on: https://chromium-review.googlesource.com/1243117
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#594040}
fs
Hoist SetNeedsPaintPropertyUpdate calls in SVGResourcesCache
We don't want/need to call SetNeedsPaintPropertyUpdate in the
TemporaryStyleScope helper.
Hoist the calls to SetNeedsPaintPropertyUpdate out of
AddResourcesFromLayoutObject/RemoveResourcesFromLayoutObject.
Also add a new UpdateResourcesFromLayoutObject function that wraps the
common Remove+Add sequence.

Bug: 866487
Change-Id: I8f8a82802be0e16807e04eead0e409562ecbdb77
Reviewed-on: https://chromium-review.googlesource.com/1243244
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#593943}
fs
Remove visual rect check from SVGMaskPainter::PrepareEffect
This just adds an (additional) dependency on the LayoutObject, while
likely not giving much in terms of gain nowadays.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0b44312f82002d5fc5b510f9eb51b9cd0caf95a2
Reviewed-on: https://chromium-review.googlesource.com/1243303
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#593940}
fs
Update expectations for wpt/svg/pservers/reftests/meshgradient-*
TBR=schenney@chromium.org

Bug: 367760, 888869
Change-Id: I3a128e57f7a12d2fdd0e885bc1104ace39b64b06
Reviewed-on: https://chromium-review.googlesource.com/1243071
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#593923}
bratell
Support jumbo compilation for content/shell (-11 CPU minutes)
Compiling content/shell does in tests consume 13.5 CPU minutes which
is brought down to 2 CPU minutes with jumbo compilation. Jumbo
compilation works by combining many cc files in a single translation
unit, thereby avoiding recompilations of headers and re-instantiation
of templates, as well as by reducing the amount of work needed by the
linker.

Unfortunately IPC message generators can not be combined with other
code since they use some headers under very special circumstances.

Bug: 886902
Change-Id: I4ceee107ea64b774c9f540047182dbcfcf3c487f
Reviewed-on: https://chromium-review.googlesource.com/1238413
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593905}
bratell
Remove references to gyp from DEPS and docs
Bug: 826218
Change-Id: I176e1aeb0b24b21c6b4e5ee40910dce2bce52c95
Reviewed-on: https://chromium-review.googlesource.com/1239461
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593522}
fs
Use StyleColor for the flood-color and lighting-color properties
This changes the _interface_ to these properties in ComputedStyle
(and SVGComputedStyle) to use StyleColor - storage is changed to
a <Color, bool> (separated) pair. Usage is updated accordingly.
This is needed in order to support "better" tainting on 'feFlood'
and other filter primitive elements to which these properties apply.
The actual tainting functions will be updated in a follow-up CL.

Bug: 792518
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I705ee38219615c4c691e4a5fbc73799a72b604da
Reviewed-on: https://chromium-review.googlesource.com/797271
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593438}
fs
Revert "[Sherrif] Disable worklet-animation-responsive-to-zoom.html"
This reverts commit 1f654b07812cf771043806cdb4b5e1c0aa7cda64.

Reason for revert:

This test was reverted by https://chromium-review.googlesource.com/c/chromium/src/+/1239773 causing presubmits to fail.

Original change's description:
> [Sherrif] Disable worklet-animation-responsive-to-zoom.html
> 
> It wasn't included in TestExpectations by
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/1237235
> 
> but it looks like it failed all the same.
> 
> NOTRY=true
> TBR=majidvp@chromium.org
> 
> Bug: 887659
> Change-Id: Iabb8204a4b4b05515838cf20378e61d07062ea51
> Reviewed-on: https://chromium-review.googlesource.com/1239446
> Reviewed-by: Frank Liberato <liberato@chromium.org>
> Commit-Queue: Frank Liberato <liberato@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#593345}

TBR=majidvp@chromium.org,liberato@chromium.org

Change-Id: I6bb03b3d8d78f3c7c66132656f00f32ee36e9a21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 887659
Reviewed-on: https://chromium-review.googlesource.com/1238916
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#593437}
fs
Fix scrollIntoView(...) for SVG elements
AbsoluteBoundingBoxRectForScrollIntoView and associated helpers did not
compute the correct bounding box for SVG shapes (or anything but the SVG
root.)
Compute the bounding rect using the stroke bounding box.

Bug: 803440
Change-Id: If25ca98b686f17a0db699e569460cb4c276f06a0
Reviewed-on: https://chromium-review.googlesource.com/1238458
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#593306}
bratell
Bring back gn.el for the Emacs GN mode
gn.el used to be in the chromium source tree until gn moved
elsewhere. Now it lives somewhere else,
https://gn.googlesource.com/gn/+/master/tools/gn/misc/emacs/gn-mode.el
which makes it less useful.

This is a copy of that file as of today. The file is not updated
often, and when it is, it's just to add more keywords so
nothing critical.

Bug: 887937
Change-Id: I39335815a2cc8ecfe2b0e1728443f6abe84a85fa
Reviewed-on: https://chromium-review.googlesource.com/1238462
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593217}
bratell
Support jumbo in //headless (-12 CPU minutes)
Jumbo is a unity build system for Chromium where many files are
compiled together. Since so much code is in headers and templates
this is much more efficient, and depending on your hardware, can
significantly speed up builds.

The headless module needs 26 CPU minutes to compile without jumbo.
With jumbo for everything, it needs 3.1 CPU minutes. Half of that
is already on master through the jumbo support in mojo. This patch
adds jumbo support for the rest, changing the compilation effort
from 15 CPU minutes to 3.

In real world time, this saves about 1.5 minutes on a full build on an
8 thread machine.

Bug: 883727
Change-Id: I3ede4805064344574c314d03904208110fdcb462
Reviewed-on: https://chromium-review.googlesource.com/1225702
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593216}
bratell
Give two ClampBufferSize functions distinct names
In some jumbo build configurations, two ClampBufferSize functions
in services/network ended up in the same translation unit which
caused compilation errors.

Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I6b7ea9c226b114a10d59fa9891e67f83537c5ec6
Reviewed-on: https://chromium-review.googlesource.com/1238219
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593215}
bratell
Gave some content_shell constants unique names and better docs
content_shell wants to replicate a chome constant at several
places which caused collisions in jumbo build experiments. This
give the replicas unique names and fixes the documentation which
was a bit outdated.

Bug: 886902
Change-Id: Ibf65de50bb2f938392fcecc910d70a4c4182c87d
Reviewed-on: https://chromium-review.googlesource.com/1233715
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593143}
bratell
[jumbo] Resolve symbol clashes in content/shell
Rename two TestServiceImpl to not clash in jumbo build experiments,
and change a kIllegalString constant to be shared.

Bug: 886902
Change-Id: I513e0641834476bb198cf24d71ef088634458313
Reviewed-on: https://chromium-review.googlesource.com/1233709
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593125}
bratell
Retire ToValueImpl and rely on ToValue for headless devtools
The previous ToValue -> ToValueImpl implementation caused
template resolution complexities and prevented jumbo support
by having a clone of the same template in every domain_types_cc
file.

Bug: 883727
Change-Id: Iec49d7bde93515fe180f26073cea59db3cf4be82
Reviewed-on: https://chromium-review.googlesource.com/1236355
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#593104}
bratell
Give content_shell message headers include guards
This is in preparation for jumbo compiling content/shell.

IPC headers generate code by being included multiple times with
different macros. This requires careful juggling of inclusions
and jumbo is not careful with when headers are included. In most
of the code this has already been solved by adding include guards
but not in content/shell until this patch.

Bug: 886902
Change-Id: I84644fba628a827dfd7825d97844aacca3a9cd8e
Reviewed-on: https://chromium-review.googlesource.com/1233743
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592905}
fs
Return const char* from CSS*Property::GetJSPropertyName
This makes callsites slightly slower (requiring calls to strlen()), but
the result is cached for the primary user of this, so the difference
from that is likely negligible. Each indiviual method however no longer
need to instantiate a WTF::String, yielding a perhaps modest, but not
insignificant, reduction in binary size (-1568 bytes according to
the android-binary-size bot.)

Change-Id: Ib9ecc17cbe3e745bc2c33e1b4d9dcbd40190e026
Reviewed-on: https://chromium-review.googlesource.com/1233710
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592728}
bratell
Remove "using namespace" from content_shell code
"using namespace" is not allowed per the Code Style Guide, but
worse, much much much worse, it won't work in jumbo builds because
they will be in a different context where a compiler error
will be triggered.

Bug: 886902
Change-Id: I635ceb8ec5d65a9d599ecd38bf0c150c90edf056
Reviewed-on: https://chromium-review.googlesource.com/1233837
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#592717}
fs
Add bug component for blink_perf.svg
Change-Id: I78b9172711cad010a754ad4d524758df39af5e61
Reviewed-on: https://chromium-review.googlesource.com/1233337
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#592388}
fs
Use DEFINE_STATIC_LOCAL in CSSProperty::GetPropertyNameAtomicString
This avoids having a destructor being run when terminating the process.
These destructor could have ordering issues wrt to the destruction of
the AtomicStringTable. Using DEFINE_STATIC_LOCAL also shrinks the binary
a bit. (The android-binary-size bot says -16375 bytes.)

Remove some redundant '\0' characters for some additional (but minor)
savings.

Change-Id: I4f5c19fceb9b668e74d3ef9bad58b104182ddb86
Reviewed-on: https://chromium-review.googlesource.com/1233700
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592383}
fs
Remove unneeded static empty_string in GetNameForFeature
This gets rid of a non-trivial (exit-time-)destructor.

Previously a (null) String was returned, but it seems that returning an
empty ("") String is more appropriate (if this is reached at all.)

Change-Id: Iba329053ea463883b41000ccb9970b3025da1ae7
Reviewed-on: https://chromium-review.googlesource.com/1230736
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592351}
fs
Use DEFINE_STATIC_LOCAL for StorageNamespace::local_storage_namespace
This eliminates an exit-time destructor.

Change-Id: I18e3d7a9bd965c6898ba31c110b993258503a2d4
Reviewed-on: https://chromium-review.googlesource.com/1230737
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592336}
fs
Use DEFINE_STATIC_LOCAL for ParkableStringManager::instance
Change-Id: Ibb54621a413f1928a04498dae65a1ae5f3e48361
Reviewed-on: https://chromium-review.googlesource.com/1230716
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592335}
fs
Merge fast/masking into css3/masking
These two cover the same specification (CSS Masking), so merge the
smaller corpus into the larger one (also preferring non-fast over fast.)

The following tests are converted to testharness.js:

  css3/masking/clip-path-selection.html
  css3/masking/parsing-clip-path-shape.html
  css3/masking/parsing-mask-source-type.html
  css3/masking/parsing-mask.html

and additionally css3/masking/clip-path-selection.html is converted
away from using eventSender.

Bug: 885137
Change-Id: I36607239ec37c69095632fe409f8a315ceb3e31e
Reviewed-on: https://chromium-review.googlesource.com/1230027
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592063}
fs
Ship CSS gradient color stop double-position syntax
Intent-to-Ship thread:

 https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/8B9FbeTBIK0/DNkC2pz-AAAJ

Also removing the actual feature and corresponding check, because it's
only used in a single spot, so if the feature should need to be
unshipped it ought to be a fairly trivial revert.

Bug: 707047, 880733
Change-Id: Ie854d7fd9f7a22e9c6144668a37f694dd1c508ee
Reviewed-on: https://chromium-review.googlesource.com/1230018
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592028}
pkalinowski
Do not try to look up non-standard URLs in auth cache
Auth cache uses URL's origin as a key, and non-standard URLs don't have
it, so it only results in an attempt to use an invalid key, trigerring a
DCHECK on the way, too.

This can happen if page uses a data URL as a source for an HTML5 video.

Bug: 882842
Change-Id: I0a1861d27152d4d84f3a7692fd94af6222ca027c
Reviewed-on: https://chromium-review.googlesource.com/1219607
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Piotr Kalinowski <pkalinowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#592005}
bratell
Windows build fix: Only depend on views_bridge_mac in mac builds
views_bridge_mac now uses a function called CreateWindow which happens
to be a macro in Win32 APIs. If a Windows builds sees that function
and knows about the macro, the build breaks, as just happened in
jumbo builds after
https://chromium-review.googlesource.com/c/chromium/src/+/1226251

TBR=ellyjones@chromium.org

Bug: 859152
Change-Id: Ia2314b7697aa75f8df60310cc504848b86c3ed05
Reviewed-on: https://chromium-review.googlesource.com/1229675
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#591986}
fs
Improve EOF handling in the headless REPL
When the REPL encounters an EOF, it can start spinning on just
generating a lot of empty ("") expressions.
Instead quit if an EOF is received and there's an empty expression. If
the expression is not empty it will still be evaluated. This helps
certain non-interactive use-cases.

Bug: 748419
Change-Id: Ica91f2164361bd6891f71e25fbdba0773c6c9941
Reviewed-on: https://chromium-review.googlesource.com/1225764
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#591979}
fs
Add basic tests for multiple position gradient stops
Tests rendering for the the case where <color-stop-length> or
(or <color-stop-angle>) is two <length-percentage> (or
<angle-percentage>.)

Spec:
 https://drafts.csswg.org/css-images-4/#color-stop-syntax

Bug: 707047, 880733
Change-Id: I56bc9b43858b37c003e081ea0ef8588f3da78627
Reviewed-on: https://chromium-review.googlesource.com/1228120
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591717}
bratell
[headless] Avoid compiling files that will not be used
In component builds headless_shell_lib compiled
lib/browser/headless_content_browser_client.cc which referred to
a lot of other code that was not compiled. Thanks to a linker
feature/quirk, the whole object file was ignored and nothing
bad happened. In jumbo build experiments the linker couldn't
do dead object file removal and the result was a lot of linkage
errors.

Bug: 883727
Change-Id: I3ef9f69cbf61ddccdb55d0929963ad33a6fb442b
Reviewed-on: https://chromium-review.googlesource.com/1226615
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591683}
bratell
One copy of headless shell switches should be enough
Many different parts of headless use the headless command
line switches, and compiled them into their lib/binary. This
caused build failures due to duplicate symbols in jumbo
build experiment. It seems the code depends on the dead object
file removal feature in the linker. Better is to just compile
and link the code once and export it from there.

Bug: 883727
Change-Id: I47ff0c86e56f2f86fbdaef6f5f7589ac82d16c66
Reviewed-on: https://chromium-review.googlesource.com/1225761
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#591663}
bratell
Reorganize headless printing support slightly
Including rendererer only code in the library "headless" that will be
used in the browser process only works if that code is dead and is
packaged in an unused object file inside a static library and linked
with a linker that ignores such object files. That is why including
"lib/renderer/headless_print_render_frame_helper_delegate.cc" kind of
worked but in jumbo build experiments it didn't.

This patch moves the renderer only printing code to libheadless.so
build code and to headless_renderer code.

Bug: 883727
Change-Id: I2ff6edfbf8c1cd79c84973933dd34a9de8fd3632
Reviewed-on: https://chromium-review.googlesource.com/1227937
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#591659}
fs
Update expectation for hittesting/image-with-clip-path.html
This test has not been flaking since it was re-enabled over a week ago.

TBR=schenney@chromium.org

Bug: 805292
Change-Id: I27fed5ac7e66b937d63adfec6f11f320e2ab7437
Reviewed-on: https://chromium-review.googlesource.com/1225986
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#591632}
fs
Change serialization for SVG resource url(...)'s
For non-local URLs, serialize the absolute form.

Reduce the AtomicString <-> String impedance while at it.

Bug: 842665
Change-Id: Ibc7804eeb6436d32202915e20e612b7bb5cf6b94
Reviewed-on: https://chromium-review.googlesource.com/1213175
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#591627}
tmoniuszko
Remove duplicated devtools_frontend_host.h from browser_sources
Change-Id: Ibaff557837b56061a0efbb2b82c673585963deb8
Reviewed-on: https://chromium-review.googlesource.com/1204132
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#591618}
fs
Trigger paint invalidation for <detail> on 'color' changes
Much like a list marker, the details marker needs be added to the
"color changed" special case/optimization.

Bug: 883711
Change-Id: Ib2237bd13887f4b5ff7fd2270bae6cb8654e0cd3
Reviewed-on: https://chromium-review.googlesource.com/1225875
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591354}
bratell
Remove unused object field that broke some builds
It's not allowed to have unused object fields but the compiler
can't always know if a field is unused. In jumbo builds it will
know more so sometimes those detect cases that normal compilation
won't see. In this case a field only used in ChromeOS builds.

In file included from gen/chrome/browser/browser_jumbo_1.cc:80:
In file included from ./../../chrome/browser/chrome_content_browser_client.cc:428:
In file included from ../../chrome/browser/speech/extension_api/tts_engine_delegate_factory_impl.h:10:
../../chrome/browser/speech/extension_api/tts_engine_delegate_impl.h:35:28: error: private field 'browser_context_' is not used [-Werror,-Wunused-private-field]

  content::BrowserContext* browser_context_;
                           ^

TBR=dmazzoni@chromium.org

Bug: 862710
Change-Id: I4eca7b940ad49fb44ec61ec513ba54db55f4914c
Reviewed-on: https://chromium-review.googlesource.com/1225759
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#591337}
bratell
[headless] Specify namespace in cases where it might be ambiguous
There are sub-namespaces to ::headless named storage and
switches and those will be chosen by the compiler instead of
::storage or ::switches if the compiler knows about them.

This problem appeared in jumbo builds where the compiler knew
more about all the namespaces. Fix is to either rename/remove
the sub-namespaces or to do what this patch does, prefix
storage with :: (so ::storage and ::switches) to clarify what
namespace is intended.

Bug: 883727
Change-Id: I1f6e428926f0a959787c2205f92505280d96b831
Reviewed-on: https://chromium-review.googlesource.com/1225792
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#591336}
tmoniuszko
Add double-click protection to bubbles
Potentially dangerous situation is possible when user is performing
double-click on UI element. If bubble is being shown as a result of
the first click, the control under the mouse cursor (button on
the bubble) can be activated with the second click. This wasn't
the intention of the user as the time between clicks was too short
to read the contents in the bubble that appeared. For example, user
can accidentally click "Accept" button on the permission prompt
bubble.

This CL adds protection against such unintended clicks. Mouse and
touch events are ignored for a short period of time after bubble
has been shown.

Bug: 864530
Change-Id: I54d229bf39dd000079b9eabd8de1cfba5103a022
Reviewed-on: https://chromium-review.googlesource.com/1140307
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591324}
bratell
Add support for jumbo in services/network (-7 CPU minutes)
This adds support for jumbo compilation of services/network. Jumbo
is a unity build implementation where many files are compiled
together in the same translation unit. That is usually much faster,
and more efficient, than compiling one file at a time, but it requires
the code to be compatible with such treatment.

In services/network there were two problems, one duplicated function
which this patch unduplicates, and the IPC/ParamTraits system which
is sensitive to include header ordering.

In total, on the build time reference test, this saves 7 CPU minutes
(from 12 to 4), or roughly 1 minute on an 8 core machine.

Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I997cc61159ccf9f23eb22f3b954b888b498e3862
Reviewed-on: https://chromium-review.googlesource.com/1221946
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#591300}
fs
Replace void* with ViewportDescription& in HTMLMetaElement
bbc7c4cca93dbfe2513b4288ff7ecf10878ebcf3 removed the old callback-driven
interface to the 'content' attribute parser - where "void* data" was the
callback closure/user data. Clean up to the type-safer way.

Change-Id: I2d9fffee65d7d38f226586be1b24d1c0ba9e8859
Reviewed-on: https://chromium-review.googlesource.com/1224394
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#591024}
bratell
[jumbo] A global enum ResourceType appeared so rename a local one
In https://chromium-review.googlesource.com/1214980 a more visible
blink::ResourceType was introduced and when jumbo compiling that
will clash with a local one inse canvas_resource_provider.cc.

This renames that enum to CanvasResourceType just to avoid the clash.

TBR=tkent@chromium.org

Bug: 242216
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I71a9a306f7763728ae6800c78be225fd1e965bb9
Reviewed-on: https://chromium-review.googlesource.com/1224012
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#590973}
fs
Remove StyleImage::SetIsLazyloadPossiblyDeferred
The only time when this is used is to set the value to true on a
StylePendingImage. The StylePendingImage is never read from or used
except for getting the underlying CSSValue though, making the store dead
and the method unused.
Also remove the cast from StyleImage to StyleFetchedImage, which is
unnecessary because the flag lives in the base class (StyleImage) and
is only set by the subclass constructors.

Change-Id: Idc899bc050ae3a7266df311279378e932194189d
Reviewed-on: https://chromium-review.googlesource.com/1213147
Reviewed-by: rajendrant <rajendrant@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#590971}
bratell
Support jumbo builds in components/viz
Jumbo is a unity build system for Chromium. By combining many cc files
in the same translation unit, the compiler doesn't have to repeat all
the work triggered by shared header. This normally makes building 5-20
times faster.

The downside to jumbo is that code intended to be local to one cc file
suddenly becomes more exposed and might clash with other code.

Jumbo support in components/viz currently saves about 5 CPU minutes of effort,
about 1% of the total reference build effort.

Bug: viz bug
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I7bff566b96b2caeac66aa8e6fb67495231206d51
Reviewed-on: https://chromium-review.googlesource.com/951791
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590954}
fs
Implement step 1 of "look up a custom element definition"
Per [1], elements with a non-HTML namespace should cause a null
custom element definition to be returned.

Implement this step.

[1] https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition

Bug: 882773
Change-Id: Idc8f4c61b94af848e13acf4ff06da2c5f6842454
Reviewed-on: https://chromium-review.googlesource.com/1221325
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#590949}
bratell
Support jumbo in the //gpu code
Jumbo is a unity build system for Chromium. By compiling many
cc files as one unit, the compile time is drastically reduced. This
patch adds support for jumbo compiling //gpu.

The expected effect is about 6 CPU minutes (~1 wall clock minute on a
normal computer) or 1% of the total reference jumbo compilation time.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I096335ba283f9b03cf4dcde554e7b19620f08834
Reviewed-on: https://chromium-review.googlesource.com/1151323
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#590626}
bratell
[jumbo] Give two GetDelegate/GetDelegateWrapper methods unique names
In jumbo builds whole chunks of the code is compiled in the same
translation unit, using the same anonymous namespace. If two
files use the same symbol names they will then clash and that
happened in chrome/browser/extensions between
active_tab_permission_granter.cc and extension_tab_util.cc.

This patch renames GetDelegate() and GetDelegateWrapper to include
the more exact names of the Delegate type, making them unique.

Bug: 865947
Change-Id: I46426e8dee715d57acaa3d2385e6dd5b6ac38cf1
Reviewed-on: https://chromium-review.googlesource.com/1219246
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590327}
bratell
[jumbo] Make it one GetIdMap() instead of two.
A commit just introduced two GetIdMap functions in ui/views/cocoa,
which broke jumbo builds because in jumbo builds they end up in
the same translation unit. This patch renames them
GetIdToWidgetImplMap and GetIdToWidgetHostImplMap

Bug: 859152

TBR=ccameron@chromium.org,ellyjones@chromium.org

Change-Id: I55b4a48d3d4f97c30450fd89bb8f52f46c2cedd7
Reviewed-on: https://chromium-review.googlesource.com/1219127
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#590257}
fs
Redirect WPT clip-path path() tests
TBR=schenney@chromium.org

Bug: 880983, 882649
Change-Id: I5d75f448106ad20adf8e9e02ab33883b7eaa54a8
Reviewed-on: https://chromium-review.googlesource.com/1219247
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#590256}
bratell
[jumbo] Specify which features namespace is intended
There are more than one namespace named features, and specifically
there are both ::printing::features and ::features. When the
compiler knows about both and is inside namespace printing,
referring to "features" will resolve to ::printing::features even
if ::features was intended.

This happens in jumbo builds in some configurations. The fix is
to clarify what features namespace is intended by using a ::
prefix. An alternative fix would be to remove ::printing::features
to ::printing::printing_features.

Change-Id: I0499ed98c3ad699e89dce8f1141c327937ba0a87
Reviewed-on: https://chromium-review.googlesource.com/1213167
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#589868}
bratell
Remove some dead and duplicate code that broke some jumbo builds
Some test code was compiled into chrome which in jumbo builds
broke the linking. In non-jumbo builds the code was probably
eliminated by the implicit dead-code-removal in the linker
(an .o file that is completely unused is ignored).

Also changing an #include "foo.cpp" to #include "foo.h" since that
caused similar linking errors related to duplicate code.

Change-Id: I6c39314fadc3a82f48135755cc7de1a540006ae5
Reviewed-on: https://chromium-review.googlesource.com/1213166
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Jialiu Lin <jialiul@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#589863}
fs
Serialize the path() function with double quotes
Per https://drafts.csswg.org/cssom/#serialize-a-string double quotes
should be used when serializing strings.

Bug: 873527
Change-Id: I3b7a3c6425c6a5d0d6f96399663f5ae8b3929a59
Reviewed-on: https://chromium-review.googlesource.com/1213171
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589652}
fs
Fix svg/parser/whitespace-{integer,length}.html
Integers should be parsed per the <integer> production, and thus should
not accept units.

In whitespace-length.html there was a bug in the test-setup that made
some tests fail that ought to pass (incorrect parameter.)

Also take the opportunity to clean up the tests a bit.

Change-Id: Id7b8964ec52f484dad424b0a1b7be6d70d062eb6
Reviewed-on: https://chromium-review.googlesource.com/1213149
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589606}
fs
Invalidate clipPath clients after mutating 'transform'
When the 'transform' presentation attribute (or CSS property) was
mutated on a <clipPath>, its clients were not notified. Make sure they
are.

Bug: 881700
Change-Id: Id42aedf814472d8156804a955e6bbf2aa2792ec2
Reviewed-on: https://chromium-review.googlesource.com/1213142
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589511}
bratell
Add support for jumbo compilations to the rest of //ui
Jumbo is the Chromium implementation of a Unity build system aimed at
dramatically lowering the compilation times, especially for those
without access to goma.

In reference testing, this patch reduces the effort to compile
content_shell+chrome+blink_tests by about 9 CPU minutes, 1-2% of the
total effort. Earlier patches saved more so the total build effort
reduction in //ui is about 41 CPU minutes.

There is still some code in ui that doesn't use jumbo. Specifically
most of the tests.

Bug: 773275
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ie59fec4b67fc1e3d6855d04a4b9a1088e0a08768
Reviewed-on: https://chromium-review.googlesource.com/834348
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#589473}
fs
Pass a float height to Font::SelectionRectForText
Rather than converting an int argument to a float in the function (that
return a FloatRect), pass a float argument and let the caller handle a
conversion (if needed.)

Bug: 881188
Change-Id: If3083fc19c866f003b0d60e10246b3088463dcdd
Reviewed-on: https://chromium-review.googlesource.com/1209923
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589471}
bratell
[jumbo] Make it one g_id_map instead of two.
A commit just introduced a second g_id_map in ui/views/cocoa,
which broke jumbo builds. This renames the g_id_map
globals to the longer names g_id_to_impl_map and
g_id_to_host_impl_map.

Bug: 859152

TBR=ccameron@chromium.org,ellyjones@chromium.org

Change-Id: Id30d71b67f4bfb7c3ddc3ec8d03c759b5b7df14f
Reviewed-on: https://chromium-review.googlesource.com/1212862
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#589465}
fs
SVGAnimatedInteger initial values
This implements initial values for SVGAnimatedInteger properties (which
includes SVGAnimatedIntegerOptionalInteger since it is a reverse proxy
for the former.)

Bug: 225807
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0563b6cfe4dc22b08ed04ab508faf4fb9491b5b4
Reviewed-on: https://chromium-review.googlesource.com/1209743
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589463}
fs
SVGAnimatedNumber initial values
This implements initial values for SVGAnimatedNumber properties (which
includes SVGAnimatedNumberOptionalNumber since it is a reverse proxy to
the former.)

Bug: 225807
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Icb62d7383cacf7df122fc56af0977015b5adf9b7
Reviewed-on: https://chromium-review.googlesource.com/1209705
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589219}
fs
SVGAnimatedEnumeration initial values
This implements initial values for SVGAnimatedEnumeration properties.

Bug: 225807, 523685
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I857dd5d6a52b2e3c4e866c2b589be3373449fc24
Reviewed-on: https://chromium-review.googlesource.com/1209683
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589217}
fs
Don't include local_frame.h in page.h
Shrinks expanded page.h size by ~2.1M.

Change-Id: I20c304f7c2a47e86a14dfecd792f0b9b4da35531
Reviewed-on: https://chromium-review.googlesource.com/1204131
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589191}
wdzierzanowski
Add missing MappedHostResolver overrides
Save for remapping hosts according to the rules, MappedHostResolver
should be a transparent wrapper around the "real" resolver.  Thus, it
must forward all HostResolver methods to the real resolver.

Change-Id: I34deed523b3cb690d450599c89bfd7f2184e843d
Reviewed-on: https://chromium-review.googlesource.com/1209402
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589150}
bratell
[jumbo] Unduplicate duplicated IsShuttingDown
Quick fix to unbreak jumbo builds. In
https://chromium-review.googlesource.com/c/chromium/src/+/1205976
a copy of IsShuttingDown was added and this patch changes the code
to instead use the original version.

TBR=kinuko@chromium.org,nhiroki@chromium.org

Bug: 715632
Change-Id: I2451fcaa009ec6403827cdb05cd3b47112c4681b
Reviewed-on: https://chromium-review.googlesource.com/1209703
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#589148}
fs
Unskip hittesting/image-with-clip-path.html
To have a chance of seeing what might be problem here (if it still
exists) we need some historical data, since there appear to be no
obvious issues with the test as such.

Bug: 805292
Change-Id: Iccbb92e2a324533858ee42802eaa2fa7ebc2240c
Reviewed-on: https://chromium-review.googlesource.com/1209363
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589139}
fs
Rework StyleImage equality determination
StyleFetchedImage and StyleFetchedImageSet needs to take the URL into
consideration because it can contain a fragment that will require the
image to change.

Bug: 643716
Change-Id: If87d3583df0fcb37f872c1423a88f4bd33e8c38f
Reviewed-on: https://chromium-review.googlesource.com/1207390
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589128}
fs
Update bug# for wpt/css/css-masking/clip-path/clip-path-path-00{1,2}.html
TBR=schenney@chromium.org

Bug: 880983
Change-Id: Ic31f977a104c95d1896ec4855c7be2c37e1e68d1
Reviewed-on: https://chromium-review.googlesource.com/1209342
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#589127}
fs
SVGAnimatedAngle initial values
This CL implements correct initial values for all SVGAnimatedAngle properties
(which is only one: 'orient' on <marker>.)

Bug: 225807, 589856
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I61c50162a98a47d0da23f3a7d0830440b8c7aa25
Reviewed-on: https://chromium-review.googlesource.com/1207331
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588942}
fs
Fold Page::NonFastScrollableRectsForTesting
Fold Page::NonFastScrollableRectsForTesting into the only user
Internals::nonFastScrollableRects. The former method does not even touch
the Page object.

Change-Id: I3d8bec815dbcbb45cb01e2a77a1d87885d7d94f9
Reviewed-on: https://chromium-review.googlesource.com/1206590
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588939}
fs
SVG property initial value mechanism and support for SVGAnimatedLength
This CL introduces a mechanism for handling "initial values" for SVG
properties. The initial value is stored in a new
|initial_value_storage_| field in SVGAnimatedPropertyBase. Subclasses
that need to store an initial value - for many cases a default
initialized object is sufficient - define what is stored in the allotted
number of bits (and thus indirectly how many bits that are required.)

The SetInitial method needs to be overloaded on the SVGPropertyBase
subclasses that the SVGAnimatedProperty holds, and is responsible for
resetting the value of the property (after "decoding" the value.)

This CL adds an implementation of the above for SVGAnimatedLength. For
this type, the initial value is stored as an index into a table of
values.

The 'fx' and 'fy' properties on SVGRadialGradientElement are updated to
have their initial values be 50% (matches Gecko.)

Bug: 225807, 474523
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ida144d6bed2d1946186e8fb3b3a0b9695ca81789
Reviewed-on: https://chromium-review.googlesource.com/1193822
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588797}
fs
[jumbo] Fix symbol clashes in components/rapport unittests
Follow up to ad2c0dc8c2bca1b767007ac3cacdb8652b566907.

TestLogUploader is defined as both rappor::TestLogUploader and
rappor::(unnamed namespace)::TestLogUploader and could thus be ambiguous
if being present in the same jumbo unit. Add rappor:: qualification in
TestRapporServiceImpl to combat this.

The kTestRapporParameters structure is defined in sampler_unittest.cc
and rappor_metric_unittest.cc. Give these slightly more unique name
(reflecting the test they are for) to avoid this.

Change-Id: I1292c643316291420f24755241a9533d89a3e45a
Reviewed-on: https://chromium-review.googlesource.com/1204018
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588604}
fs
Resolve :root and table-cell currentcolor using background box's style
In BackgroundImageGeometry::ImageStyle we'd always return the computed
style for |box_| (the box for which we're painting), and thus use that
to resolve currentcolor, although in some cases (for :root and table-
cells that get their backgrounds from the row or column) we ought be
using the style from the element that the background originated from.

Bug: 848860
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9113957889a3f091d3fe71830c0805a4064734b5
Reviewed-on: https://chromium-review.googlesource.com/1203373
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588536}
fs
Forward declare DocumentLoader in deprecation.h
Shrinks page.h by ~1.1M.

Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ie71224313e0a1c26319854707b14e62e65dc46a3
Reviewed-on: https://chromium-review.googlesource.com/1203911
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588504}
fs
Get rid of include of page_overlay.h in page.h
Shrink page.h from ~9.16M to ~7.01M.

Change-Id: If7516a607c481637ec12872edd33641df8e5ad95
Reviewed-on: https://chromium-review.googlesource.com/1203835
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588484}
fs
Redirect css-masking expectations to crbug.com/432153
These tests are all about 'mask-image' (the unprefixed property.)

TBR=schenney@chromium.org

Bug: 432153, 880183
Change-Id: I399ea4dd6a3dd48ee464a12279caa2a4fdd9f3a2
Reviewed-on: https://chromium-review.googlesource.com/1203891
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588478}
bratell
[jumbo] Give two kForcedInvocationDeadline constants unique names
In certain jumbo configurations, the two constants names
kForcedInvocationDeadline could end up in the same translation
unit and then clash. This patch changes the names to
kTextFinderTestTimeout and kIdleSpellcheckTestTimeout.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I76e030b98bead46fa0aff7f3e0ce1f264d754ef9
Reviewed-on: https://chromium-review.googlesource.com/1202064
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588441}
fs
Use Element::LocalNameForSelectorMatching in InvalidationSet
To match ElementRuleCollector et al. We will lower-case tag names on
(selector) parsing in HTML documents, and thus need to give the same
treatment to the local name extracted from the element.

Bug: 856368
Change-Id: I07e726864de048f5948cb27fa7e5dd6eaad9b0ef
Reviewed-on: https://chromium-review.googlesource.com/1202206
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588427}
oscarj
Enable jumbo support in storage/browser
//storage/browser takes around 6.2 CPU minutes to
build without jumbo. With jumbo the build time is
reduced by around 83 %.

This commit enables jumbo support in storage/browser.

Bug: 871163
Change-Id: I51254087ea584d64fc599aa232ab2b73027791ec
Reviewed-on: https://chromium-review.googlesource.com/1170691
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#588365}
fs
Distribute widths evenly among code points in SynthesizeGraphemeWidths
Previously we did not consider the possibility of a typographic unit
containing multiple surrogate pairs, and could as an effect "lose" part
of the width.

Distribute the width evenly among code points instead to at least get
some sort of consistency.

Bug: 879361
Change-Id: I51a4e6c574926215a087b0bc824ac90d580ff169
Reviewed-on: https://chromium-review.googlesource.com/1199423
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588183}
fs
Simplify candidate selection in HTMLImageElement::SelectSourceURL
Rather than using the |found_url| local, recognize that it is equivalent
to !candidate.IsEmpty(), and use regular control flow instead.

Change-Id: I5f28a4099bc4252ec9ea5b9ed616116f64b97ace
Reviewed-on: https://chromium-review.googlesource.com/1196383
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588048}
fs
Handle non-image backgrounds in BoxModelObjectPainter::PaintTextClipMask
When we paint a background color for a line, we don't adjust the paint
offset based on the logical offset on the "virtual line", so we mustn't
try to undo the adjustment in BoxModelObjectPainter::PaintTextClipMask
when we're generating the mask for "(-webkit-)background-clip: text".

Check the |object_has_multiple_boxes| and don't undo the adjustment if
it is false.

Bug: 879292
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9ec9c5cdfeb675803e54407f2e98e39b2dc1bc6b
Reviewed-on: https://chromium-review.googlesource.com/1199343
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#588038}
fs
Handle degenerate curve segments for marker orientation
When a cubic or quadratic curve have a point that coincide with another
of its point such that either the start or end tangent vector is
degenerate, the orientation in that point will be 0. In such cases try
to use the next/previous non-degenerate tangent vector (if any) instead.

Bug: 450368
Change-Id: I35db404b3f82cf61b10427678feecc2157eeeb26
Reviewed-on: https://chromium-review.googlesource.com/1196503
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587743}
fs
Fix SVG systemLanguage conditional processing
The algorithm that performs the test between browser language preference
and the systemLanguage value has been modified
to implement a language-tag match based on the prefix,
making it consistent with BCP 47's basic filter operation and
as specified in the SVG 1.1 spec.

The previous behavior was:

- Tests whether the value of the attribute (e.g., "en-us") is a prefix
of the user preferred language (e.g., "en")
(which would evaluate to false)

The test was modified to compare in the opposite manner,
now user preferred language must be a prefix of the value.

- If the language tag length was not 2, the language tag
was not matched, (e.g. It did not match "en-us" to "en-us").
This check has been removed.

- The algorithm did not check for a trailing hyphen ("-").
We do not want langtag "it" matching langtag "ita",
but it is ok for "it" to match "it-it".
Now it does.

------------

The algorithm that performs the test between browser language preference
and the systemLanguage value has been modified
to implement a case insensitive language-tag match:

"en" matches "EN".

The previous behavior was case sensitive.

------------

Add Luca Di Domenico to AUTHORS

------------

Bug: 872378, 869440
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ibe767644b5a92e8d79ffe4b7777f5f51851b3883
Reviewed-on: https://chromium-review.googlesource.com/1188314
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587592}
fs
Update expectation for fast/dom/HTMLImageElement/image-srcset-w-onerror.html
Re-routing to newer bug which contains more analysis of the issue.

TBR=schenney@chromium.org

Bug: 636207, 876732
Change-Id: Ic857feff265217a0244fd0bd25999d0db354b0b2
Reviewed-on: https://chromium-review.googlesource.com/1196343
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587507}
tmoniuszko
Fix views_mus_unittests dependency on views test support
Bug: 878384
Change-Id: I9105fbf1d4dcd52037b2ab6a56a42f5c7124c380
Reviewed-on: https://chromium-review.googlesource.com/1194026
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#587486}
fs
Force layout and paint when 'filter' changes on SVG elements
Because of how filters interact with layout and paint (bounds dependency
and filter caching et.c), we need to trigger layout (for bounds) and
paint (for caching) when 'filter' changes. (A 'none' <=> <something>
transition will trigger layout in general, but not a change from one
filter to another.)

Bug: 878591
Change-Id: I8bfad033f962bdfcb5000052ee07db7771428e3d
Reviewed-on: https://chromium-review.googlesource.com/1195485
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587272}
fs
Refactor SVGMarkerData
This CL reworks the core of SVGMarkerData so that it first extracts the
"features" of the current segment/PathElement, and then uses those
features to determine the orientation.

The state of SVGMarkerData is also changed from two pairs of points to
two vectors, since this is the representation that's actually used by
CurrentAngle(). It should also be a better representation when handling
of degenerate curves is added.

CurrentAngle() is changed to return a 'double', and the clamping
previously done in the method is now done by the callers. Additionally
The code that computes the bisected angle is split out to a separate
function.

Bug: 450368
Change-Id: Ic9561cab3bbf9c3f5cbc9f3607cfc9bfe90fea05
Reviewed-on: https://chromium-review.googlesource.com/1193847
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587220}
fs
Call CommitChange after a SVG*List.clear() operation
The SVGListPropertyTearOffHelper did not call CommitChange(), meaning
that the element wasn't notified of the change, and wouldn't invalidate
et.c as needed. It also could've failed to synchronize the attribute
properly.

Bug: 843901
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iad581027c3748e3e90cf6fe3d944273b207fef0f
Reviewed-on: https://chromium-review.googlesource.com/1189882
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586625}
fs
Empty SVG*List should serialize to the null String
When synchronizing an empty list, the result should be that the
attribute is removed. However, since StringBuilder::ToString for an
"empty" StringBuilder returns the empty string we end up setting an
empty attribute. Add a special case to handle empty lists, and return
the null String there instead. The null String will translate to an
attribute removal.

All the SVG*List types that inherit from SVGListPropertyHelper are
changed call a new shared implementation (SerializeList) in that class.

Bug: 843901
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9442268196aaa605886fd4d6d31d66ae075f901d
Reviewed-on: https://chromium-review.googlesource.com/1189862
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#586251}
fs
Clear SVG property synchronization flag on attribute update
When an SVGAnimatedProperty has its associated attribute updated, we can
cancel any pending attribute synchronization.
This prevents overwriting the new value with the old in some cases.

Bug: 843901
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3654ad616fd6e6ef82a1933ec034bc9cf0097d56
Reviewed-on: https://chromium-review.googlesource.com/1189842
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#586246}
fs
Align HitTestClippedOutByClipPath coordinate space with paint
In the paint code (ClipPathClipper), the reference box used is the one
computed by LocalReferenceBox(), and the coordinate space is adjusted
for that. In the hit-testing code however, the reference box is adjusted
instead, leading to incorrect results when the reference box is
subjected to an additional transform (a 'transform' on a <clipPath>.)

Instead, set up the reference box and coordinate space in the hit-
testing code in the same way as for paint, by translating to the correct
local coordinate space before performing the actual hit-test.

Bug: 876390
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I60acd616964a942893f0e256766aca728d14b494
Reviewed-on: https://chromium-review.googlesource.com/1188302
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#586028}
fs
Make baseVal attribute synchronization explicit
This moves the |base_value_updated_| flag from the "primitive type"
version of SVGAnimatedProperty to SVGAnimatedPropertyBase, and sets it
in BaseValueChanged. The flag is cleared in SynchronizeAttribute.
This allows some code to be simplified. It also avoids synchronizations
triggered by just having created the tear-off object like in the bug.

Bug: 873470
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I59f30dd69286dc0799a583eb6a52c41022b0af91
Reviewed-on: https://chromium-review.googlesource.com/1188305
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585852}
fs
Remove some unneeded includes of svg_element.h
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I989622cb82e8135d387f5807723eaf0704e2bbb3
Reviewed-on: https://chromium-review.googlesource.com/1188306
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#585842}
fs
Rename SVGAnimatedPropertyBase::SetBaseValueAsString
Rename SVGAnimatedPropertyBase::SetBaseValueAsString to
AttributeChanged, to reflect how it interacts with the system in general
(sets a new value based on an updated attribute string) - the counter-
part to this notifier being BaseValueChanged.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I55b42d7662c744d4d4d39b8ea0545d0318bcbeab
Reviewed-on: https://chromium-review.googlesource.com/1184844
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#585077}
mpawlowski
Fix PrefHashFilter's behavior when clearing a tracked pref
When a tracked pref is cleared, it will no longer be present in the
DictionaryValue that represents the pref store contents, but
FilterUpdate() and FilterSerializeData() will still be called. Make
the code handle nullptr Values safely.

Bug: 867337
Change-Id: I1840c3f60bd815145a0f765adf5907a35bca1c87
Reviewed-on: https://chromium-review.googlesource.com/1150034
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: proberge <proberge@chromium.org>
Commit-Queue: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585055}
fs
Rework SVG*TearOff types back-referencing
In preparation for making base-val <-> attribute synchronization,
refactor the SVG*TearOff hierarchy so that "mutation notifications" are
funneled through the SVGAnimatedProperty(Base) if the tear-off is
associated with an attribute.

Rather than storing a SVGElement* and QualifiedName, store a reference
to the underlying SVGAnimatedProperty(Base) instead of the latter. This
is then used to send notification through.

BUG=873470

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib6e5c25cf97b806ff613a39478dc4f10f85dcaf5
Reviewed-on: https://chromium-review.googlesource.com/1181342
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584888}
ggacek
Fix possible use-after-free when menu is closed by its item.
Fix use-after-free which occured when a menu contained an item closing
it on a mouse press event. In such case MenuController object was freed
during a call of its OnMousePressed() but it continued to modify its
member variables.

Bug: 871205
Change-Id: Ic2a5dd3a745da6b0c1ef7a87f2cb498cc1a97234
Reviewed-on: https://chromium-review.googlesource.com/1163617
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584706}
mpawlowski
Don't re-initialize mojo::core in gaia unittests
mojo::core::Init() should be called once per process, not once per test.
run_all_unittests.cc happens to already define a test launcher that
calls mojo::core::Init(), so if we use that instead of the base
launcher, we can get rid of re-initialization in test fixtures.

Bug: 869281
Change-Id: Ieb96cbe580f5f1750d7f61693c288bb578cb63b0
Reviewed-on: https://chromium-review.googlesource.com/1155595
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584501}
fs
Fix naming of SVG{AnimatedProperty,PropertyTearOff}Base::contextElement
contextElement -> ContextElement

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If22cc5a0624cfaf9e1e448198c891de3030bc889
Reviewed-on: https://chromium-review.googlesource.com/1181058
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584435}
fs
Update bugref for a bunch of tests in wpt/svg/text/reftests/
TBR=schenney@chromium.org
BUG=875411

Change-Id: I83c6386435a1d519359e41b9a38bb37d8c646900
Reviewed-on: https://chromium-review.googlesource.com/1180890
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584388}
fs
Simplify SVGElement::ParseAttribute
There's no real reason to give 'tabindex' preferential treatment (not
anymore at least.) Just let it be handled by the common fall-through
code-path and flatten the structure of the code a bit.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I96e6c265aeb384fe1acc0b61378078bb3d06051c
Reviewed-on: https://chromium-review.googlesource.com/1179886
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584218}
fs
Remove dead code in SVGListPropertyHelper<...>::ReplaceItem
If |values_| does not contain any entries, then CheckIndexBound will
fail, so the 'values_.IsEmpty()' condition can never be true here.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3c96b6b198a8d9f345a08a436101d803384d11e2
Reviewed-on: https://chromium-review.googlesource.com/1179834
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584174}
fs
Remove dead code in SVGElement::ParseAttribute
The 'params.name == HTMLNames::classAttr' condition will never be true,
because the if-block just above it will catch that case. The
|class_name_| SVGAnimatedProperty object is registered in the attribute
map. Retain and update the comment about the somewhat special handling
of the 'class' attribute.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9928fb6f9c29d5db961b7f937fe4b1c0fb3fde82
Reviewed-on: https://chromium-review.googlesource.com/1179749
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584067}
fs
Remove SVGDocumentExtensions::IsSVGRootWithRelativeLengthDescendents
It's not used.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If6630b2e404108044833ea5512151facdfe7e59d
Reviewed-on: https://chromium-review.googlesource.com/1179760
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#584061}
fs
Avoid recursing in the FragmentData destructor
Too deep recursions can cause stack overflows.

Bug: 874759
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie532e28bceee4e7f1c3ab501b80c0e2f14be083a
Reviewed-on: https://chromium-review.googlesource.com/1106378
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#583657}
fs
external/wpt/svg/render/reftests/blending-00[12].svg now pass
TBR=schenney@chromium.org
BUG=866928

Change-Id: I3d228b5596e2c644399882f0c5c697ff0d882b6e
Reviewed-on: https://chromium-review.googlesource.com/1177383
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#583586}
fs
Tweak cover blending in wpt/svg/render/reftests/blending-00[12].svg
Set 'mix-blend-mode' to 'normal' on the stroked rects that make up the
"edge cover". Hopefully this avoids aliasing artifacts on the edge cover
itself.

In blending-002.svg, localize the use of (non-auto) isolation to the
content of the test.

BUG=866928

Change-Id: I269e01a4d814f7fd8e202ffdf71c1a1d5dc48347
Reviewed-on: https://chromium-review.googlesource.com/1175825
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#583277}
fs
wpt/svg/painting/reftests/markers-orient-001.svg now pass
TBR=schenney@chromium.org
BUG=872697

Change-Id: Ib925da7763c4091feacfd489bce1c82c752309ef
Reviewed-on: https://chromium-review.googlesource.com/1175796
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#583226}
fs
Fix element creation in wpt/svg/idlharness.window.js
Adjust casing for 'desc', 'switch' and 'mpath'. Remove a duplicate
'animateColor'.

BUG=868861

Change-Id: I19256547abea3028791de402e354c47eee8ce949
Reviewed-on: https://chromium-review.googlesource.com/1174261
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582955}
fs
Fix ref for external/wpt/svg/painting/reftests/paint-order-001.svg
The property:

  paint-order: stroke markers

is equivalent to:

  paint-order: stroke markers fill

(Spec: "If any of the three keywords are omitted, they are painted last,
 in the order they would be painted with paint-order: normal."
 @ https://svgwg.org/svg2-draft/painting.html#PaintOrder )

So the fill should be painted last. Add 'marker:none' to the appropriate
element in the ref.

Disable stroke and marker in a few cases to avoid "overdraw" and thus
"incorrect" edge rendering in some cases.

BUG=872972

Change-Id: I835a6980fa069825ed2a2e920862018faec6d93c
Reviewed-on: https://chromium-review.googlesource.com/1172778
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#582914}
mharanczyk
Add target to mojom template that generates all bindings headers.
The change should address random build failures of missing mojo
bindings generated headers on targets that cannot depend on bindings
code directly but need to use it.

Extra: Add missing deps to blink scheduler test_support target.

Bug: 852558
Change-Id: Ib0e3be23093dcda6629f6f8d0149d9d5a57bac07
Reviewed-on: https://chromium-review.googlesource.com/1151301
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Cr-Commit-Position: refs/heads/master@{#582874}
fs
Disable 'visual aid' in wpt/svg/painting/reftests/markers-orient-001.svg
The test has a red version of the reference painted under the actual
test content. Because of how alpha/coverage often work (at least in
software rasterizers), this can lead to the read bleeding through and
thus affecting the comparison with the reference image.
Disable the red reference shapes by adding a CSS rule. This way, if
someone feels it's useful for debugging they can easily re-enable it.

BUG=872697

Change-Id: Id47757c9dd112ead0db9c2dcd1adc74d5a52e55d
Reviewed-on: https://chromium-review.googlesource.com/1172622
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#582598}
fs
Update bugrefs for SVG WPT tests from crbug.com/872697
external/wpt/svg/text/reftests/text-multiline-001.svg
external/wpt/svg/text/reftests/text-multiline-002.svg
external/wpt/svg/text/reftests/text-multiline-003.svg

 => crbug.com/366558

external/wpt/svg/text/reftests/text-inline-size-001.svg
external/wpt/svg/text/reftests/text-inline-size-002.svg
external/wpt/svg/text/reftests/text-inline-size-003.svg
external/wpt/svg/text/reftests/text-inline-size-005.svg
external/wpt/svg/text/reftests/text-inline-size-006.svg
external/wpt/svg/text/reftests/text-inline-size-007.svg
external/wpt/svg/text/reftests/text-inline-size-101.svg
external/wpt/svg/text/reftests/text-inline-size-201.svg

 => crbug.com/366553

external/wpt/svg/painting/reftests/markers-orient-001.svg

 => crbug.com/872697 (pending testfix)

TBR=schenney@chromium.org
BUG=366553,366558,872697

Change-Id: Ib75f5c0cda767108745618ab508a6a8730e3b1b1
Reviewed-on: https://chromium-review.googlesource.com/1172430
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#582576}
fs
Update bugref for external/wpt/svg/shapes/reftests/pathlength-002.svg
TBR=schenney@chromium.org
BUG=863355

Change-Id: Ib58518bb68af39fb5e106cb0da0f08df5e6a832a
Reviewed-on: https://chromium-review.googlesource.com/1172361
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#582565}
fs
Update bug references for some failing SVG WPT tests
These tests fail because of lack of support for references to general
shapes from <textPath> and the 'side' attribute in <textPath>.
crbug.com/366559 is the bug for supporting thos features, so redirect to
it.

Tests:

  external/wpt/svg/shapes/reftests/pathlength-003.svg
  external/wpt/svg/text/reftests/textpath-side-001.svg
  external/wpt/svg/text/reftests/textpath-shape-001.svg

TBR=schenney@chromium.org
BUG=366559,863355

Change-Id: Ia2fc56704fafd3ace0af949fceeaf2799f960fe7
Reviewed-on: https://chromium-review.googlesource.com/1172298
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#582542}
oscarj
Enable jumbo support in components/password_manager/
Without jumbo, password_manager takes around 3.6 CPU
minutes to build. With jumbo and chunk size 50,
password_manager takes around 11 seconds to build,
a decrease by around 94 %.

This commit enables jumbo support in
components/password_manager.

Bug: 869381
Change-Id: Icce9d9800a01d452d63ba137c52c2a0495359da8
Reviewed-on: https://chromium-review.googlesource.com/1166963
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582109}
oscarj
Enable jumbo support in components/autofill
//components/autofill takes 6.6 CPU minutes to compile.
With jumbo and chunk size = 50 the build time is reduced
by around 54 %.

This commit enables jumbo support in components/autofill.

Bug: 869381
Change-Id: Iba405b8c2199f68c11a13ee0872bfaae87943d7f
Reviewed-on: https://chromium-review.googlesource.com/1170689
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#582105}
oscarj
Replace operator with lambda (content/browser)
When building with jumbo the compiler sees two
operator==, declared in the files:
content/common/media/media_devices.h
content/browser/indexed_db/scopes/scopes_lock_manager.cc

Therefore, it throws an error. This commit solves the
issue by replacing the operator with a lamdba doing
the same operation.

Change-Id: I285a95a77ac55d2502d146316da12339de277fc9
Reviewed-on: https://chromium-review.googlesource.com/1169468
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582086}
oscarj
Make function names unique (components/autofill)
When building using jumbo, files gets merged and
functions with the same name may end up in the
same namespace and conflict. This happens for
functions in:
components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc

The functions are very similar but not identical. Therefore,
the functions in
components/autofill/core/browser/webdata/autofill_wallet_syncable_service.cc
are renamed to be something more file specific.

Bug: 869381
Change-Id: I8b26857cfa9fd80b42d9ff79de4b49753c824b54
Reviewed-on: https://chromium-review.googlesource.com/1169018
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581867}
oscarj
Move TruncateUTF8 to util (components/autofill)
When building using jumbo, files gets merged and
functions with the same name may end up in the
same namespace and conflict. This happens for
the function TruncateUTF8.

This commit solves the issue by moving the function
to a shared util file.

Bug: 869381
Change-Id: Ia9f754138fb18aa9af575f7cd2f92bca4e8ea0c2
Reviewed-on: https://chromium-review.googlesource.com/1168497
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581866}
oscarj
Specify autofill::AddressField (component/autofill)
When building using jumbo, files gets merged and
the compiler gets a larger scope. AddressField is
defined in both autofill::AddressField and
::i18n::addressinput::AddressField and the
reference is ambiguous. That is the reason
the namespace autofill:: needs to be specified
even though the call is made within that namespace.

Bug: 869381
Change-Id: I3ac8813403e04b37b7936397e617aab436214056
Reviewed-on: https://chromium-review.googlesource.com/1169012
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581864}
oscarj
jumbo build: Rename constants to be unique (storage/browser)
When building using jumbo, files gets merged and
constants with the same name may end up in the same
namespace/scope and conflict.

This commit solves the issue by renaming the constants
to something more file specific.

Bug: 871163
Change-Id: Ic4973b976597dbc097897406951ae8c2cbdf6430
Reviewed-on: https://chromium-review.googlesource.com/1163505
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581535}
oscarj
Forward declare operator overload (components/)
When building using jumbo, files get merged and more options
are presented for the compiler. When using the operator overload <<
in PasswordRequirementsSpec, the compiler gets too many
options and will fail before reaching the correct operator overload.

The issue solved by forward declaring the operator overload in the files
that uses it.

Bug: 869381
Change-Id: I3d0226c9e12b1e64b3359a1efb2f9948a24e61b6
Reviewed-on: https://chromium-review.googlesource.com/1160228
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581526}
oscarj
Move macro to util file (storage/browser)
When building using jumbo, files gets merged
together and macros with the same name may
end up in the same namspace and conflict. This
happens for the macro UMA_HISTOGRAM_MBYTES.

This commit solves the issue by moving
the macro to a shared util file.

Bug: 871163
Change-Id: If3af541913a6add55ce739eb43f5a747cf4afd9a
Reviewed-on: https://chromium-review.googlesource.com/1163602
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#581192}
oscarj
Enable jumbo support in //chrome/renderer
Without jumbo, chrome/renderer takes around
7 CPU minutes, which is around 1.2 % of the
total build time.

This commit will enable jumbo support for
this target, reducing build time when using
jumbo.

Bug: 870617
Change-Id: I4b35b6fc69e30c61dc1f24082bbaa338ad96b4ef
Reviewed-on: https://chromium-review.googlesource.com/1161804
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580827}
oscarj
Rename constants to be unique (chrome/renderer)
When building using jumbo, files gets merged and
constants with the same name may end up in the
same namespace and conflict. This happens for:
chrome/renderer/chrome_content_renderer_client.cc
chrome/renderer/extensions/extension_hooks_delegate.cc
chrome/renderer/extensions/tabs_hooks_delegate.cc

This commit solves the issue by renaming the constants
to something more file specific.

Bug: 870617
Change-Id: I3ded3625b3851724362d496191c5bd25dda081f6
Reviewed-on: https://chromium-review.googlesource.com/1161803
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580821}
oscarj
Move function to util (components/password_manager/)
When building using jumbo, files gets merged and
functions with the same name may end up in the same
namespace/scope and conflict. This happens for the
function UpdateMetadataForUsage.

This commit solves the issue by moving the function
to a shared util file.

Bug: 869381
Change-Id: I57b8f9c96c785a3bbfc8250f0edbe7690c3b3ff7
Reviewed-on: https://chromium-review.googlesource.com/1160482
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580514}
oscarj
Rename UserDataKey to be unique (components/autofill)
When building using jumbo, files gets merged and
functions with the same name may end up in the same
namespace/scope and conflict. This happens for
the function UserDataKey. Since the function relies
on that the static int is unique this function could
not be moved to a shared util file. Instead, the issue
was solved by renaming the function.

Bug: 869381
Change-Id: Ifd67ac865e9d0bad272cc51ef1af8c3a5b382893
Reviewed-on: https://chromium-review.googlesource.com/1160487
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580483}
oscarj
Rename LoginTableColumns (components/password_manager)
When building using jumbo, files gets merged and enums
with the same name may end up in the same namespace and
conflict. This happens for he enum LoginTableColumns.

This commit solves the issue by renaming one instance
of LoginTableColumns to something more file specific.

Bug: 869381
Change-Id: I9a0b95dcddee3bbc9f1b8969142aa683e11025a0
Reviewed-on: https://chromium-review.googlesource.com/1160496
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580482}
oscarj
Move variable to util (components/autofill/)
When building using jumbo, files get merged and
variables with the same name may
end up in the same namespace and conflict.

This happens for the constant kLocalGuidSize in autofill/core/browser.
The variable is moved to a util file in
common.

Bug: 869381
Change-Id: I038ef40acd5617f9d9d1e18c81a2fcce55cab8eb
Reviewed-on: https://chromium-review.googlesource.com/1158544
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580142}
oscarj
Enable jumbo support for //components/omnibox
Without jumbo, omnibox takes around 3 CPU minutes to build
which is around 0.5 % of the total build time.

This commit enables jumbo support in components/omnibox.

Bug: 869381
Change-Id: Ifb51dab5a6b034a384c6bf07ee2f5b8c17b952a7
Reviewed-on: https://chromium-review.googlesource.com/1156593
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#580114}
oscarj
Move CreditCard function to util (/autofill)
When buidling using jumbo, files gets merged and functions
with the same name may end up in the same namespace and
conflict. This happens for the function IsCreditCardExporationType
in:
components/autofill/core/browser/form_structure.cc
components/autofill/core/browser/autofill_manager.cc

Since the functions are identical they are moved to a shared
util file. Since the function needs
components/autofill/core/browser/field_types.h it cannot be
moved to components/autofill/core/common.

Bug: 869381
Change-Id: I69492fbc8af0ed9289504cb6aba3e745acb17b24
Reviewed-on: https://chromium-review.googlesource.com/1158364
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579778}
oscarj
Renaming conflicting variables names (components/autofill)
When building using jumbo, files get merged and variables
and functions with the same name may end up in the same
namespace/scope and conflict.

This commit solves the issues in components/autofill
by renaming the conflicting functions and variables to
something more file specific.

Bug: 869381
Change-Id: Ifccae861ca7379346fb0939113ac227b770f9640
Reviewed-on: https://chromium-review.googlesource.com/1158235
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#579768}
oscarj
Resolve namespace scope issue (components/autofill)
When building using jumbo, files get merged. This
results in a conflict with the namespace i18n.
This commit solves the issue bu specifying that the
global namespace should be used, by addind the
"::" prefix.

Bug: 869381
Change-Id: I3432251c5f91fbb1f35df6ef5a9c70337df5e21f
Reviewed-on: https://chromium-review.googlesource.com/1156601
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#579765}
oscarj
Enable jumbo for media/capture
Building //media takes around 23 CPU minutes. A experimental
branch showed that this could be reduced, by using jumbo,
to around 9 CPU minutes. media/capture is the fifth largest part
of media and takes around 2 CPU minutes to compile without
jumbo.

This commit enables jumbo for media/capture.

Bug: 867350
Change-Id: Ib53497ecde8a096b4436b4c60069e9e24e482a68
Reviewed-on: https://chromium-review.googlesource.com/1154922
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579745}
oscarj
Remove "using namespace" (jumbo, media/capture)
When building using jumbo, files get merged and
the usage of "using namespace..." results in the
error:
using namespace directive in global context in header

This commit solves the issue by removing
"using namespace" and instead write the complete
name when it is used.

Bug: 867350
Change-Id: Iba570fbb737819ed515dc686ba65f9e7f9b47653
Reviewed-on: https://chromium-review.googlesource.com/1154538
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579380}
bratell
Avoid the name "interface" since it's a macro in Windows
In Win32 some headers defines "interface" to mean struct which
makes it unsuitable to cross platform code. This instance was
hit in a jumbo experimental build where apparently enough
win32 headers were included in the translation unit.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I1e906a46620378be2ded6a4a4868e2034cc1868b
Reviewed-on: https://chromium-review.googlesource.com/1152735
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578715}
oscarj
Enable jumbo for media/cast
Building //media takes around 23 CPU minutes. A experimental
branch showed that this could be reduced, by using jumbo,
to around 9 CPU minutes. media/cast is the fourth largest part
of media and takes around 2 CPU minutes to compile without
jumbo.

This commit enables jumbo for media/cast.

Bug: 867350
Change-Id: Iaefb6e7ac95c1c7fab78478f879a8ba542f329d9
Reviewed-on: https://chromium-review.googlesource.com/1152807
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578609}
oscarj
Enable jumbo for media/filters
Building //media takes around 23 CPU minutes. A experimental
branch showed that this could be reduced, by using jumbo,
to around 9 CPU minutes. media/filters is the third largest part
of media and takes around 2 CPU minutes to compile without
jumbo.

This commit enables jumbo for media/filters.

Bug: 867350
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I01fe34fb39b35bf1a95e893916c2fc49e59a6d9e
Reviewed-on: https://chromium-review.googlesource.com/1152808
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578608}
oscarj
Move transport functions and variables to util (media/cast)
When building using jumbo, files get merged and functions and
variables with the same name may end up in the same namespace
and conflict. This happens in:
media/cast/net/cast_transport_impl.cc
media/cast/net/udp_transport_impl.cc

Since the functions and variables are identical they are
moved to a common util file.

Bug: 867350
Change-Id: I08747781d56b78e9a8783bfec870c7084183062a
Reviewed-on: https://chromium-review.googlesource.com/1152738
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578596}
oscarj
Rename InProgressFrameEncode to be unique (media/cast)
When building using jumbo, files get merged and functions
with the same name may end up in the same namespace. This
happens with the functions InProgressFrameEncode defined in:
media/cast/sender/external_video_encoder.cc
media/cast/sender/h264_vt_encoder.cc

This commit solves the issue by renaming the functions
to something more file specific.

Bug: 86750
Change-Id: I8f6fb84783539dcec4aae824bb971e982b4db5c2
Reviewed-on: https://chromium-review.googlesource.com/1152745
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578594}
oscarj
Resolve jumbo conflict in video decoders (media/filters)
When building using jumbo, files gets merged. Files and
variables with the same name may merge into the same
namespace or scope and conflict. This happens in the files:
media/filters/aom_video_decoder.cc
media/filters/ffmpeg_video_decoder.cc
media/filters/vpx_video_decoder.cc

This commit solves the issue by renaming the function
GetThreadCount to something more file specific. It also
moves some constants to that function.

Bug: 867350
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Id57aa6cc6ac10acd0073eee032d0d04592ba87e4
Reviewed-on: https://chromium-review.googlesource.com/1151311
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578593}
oscarj
Resolve function name conflict (media/filters)
When building using jumbo, files merged and functions with
the same name may end up in the same namespace/scope. This
happens for the function OnError() that gets called by Bind().
OnError() is defined in:
media/filters/audio_video_metadata_extractor.cc
media/filters/media_file_checker.cc

This commit solves the issue by renaming one of the functions
to something more file specific.

Bug: 867350
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I1b762e4f1c4b11751df2302874af53106889d085
Reviewed-on: https://chromium-review.googlesource.com/1151316
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578592}
oscarj
Forward declare template specialization (media/filters)
In jumbo builds the compiler complain about not
knowing about the template specialization of the
function OnStartOfCodedFrameGroup, that is defined
in source_buffer_stream.cc. To solve this issue
a fordward declaration is done before usage.

Bug: 867350
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: If090b848bc2ae78121620aba2349eac4c63d8a65
Reviewed-on: https://chromium-review.googlesource.com/1151313
Commit-Queue: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578591}
bratell
Split osmesa code into its own build target
Some osmesa code uses the "real" OSMesa API headers and those are
not 100% compatible with the wrapper API headers normally used.
That incompatibility means that they cannot compile in the same
translation unit (jumbo builds). This splits the osmesa files
into their own build target to avoid potential conflicts.

Also changes the code to be consistent with how osmesa.h is included.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ifc96cf25f7b69f23f293e297ab59ce5192f1cd20
Reviewed-on: https://chromium-review.googlesource.com/1149874
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578588}
bratell
Change variable names in gpu info tables to be jumbo compatible
In jumbo compilation many cc files compile in the same translation
unit and if they use the same local variable names, there will
be compilation clashes. That happened in the automatically generated
code with info about various problems in gpu drivers or the like.

This patch makes sure necessary variables have unique names by
adding a unique keyword for each set of data.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ief86248f2d17f123602c7e641c286d0550a85d89
Reviewed-on: https://chromium-review.googlesource.com/1151314
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578587}
bratell
Don't use Khronos headers from gpu code
Switching from Khronos headers to more approprite headers
primarily to avoid jumbo compilation problems but also
because it was wrong.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I9a7c33acfcc72133638c47ae370020331c445ac9
Reviewed-on: https://chromium-review.googlesource.com/1151630
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578402}
mboc
Allow values with dot delimiters as split mac dictionary keys.
Using e.g. URLs as hash split keys is not possible ATM. Change this by
deliberately not expanding the dictionary tree on settings split hashes.

Change-Id: Ifbc09aedd546f2f7e774807e091caa2069e1d0a6
Reviewed-on: https://chromium-review.googlesource.com/1144880
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578378}
oscarj
Enable jumbo support in media/base
Building //media takes around 23 CPU minutes. A experimental
branch showed that this could be reduced, by using jumbo,
to around 9 CPU minutes. media/base is the second largest part
of media and takes around 3.1 CPU minutes to compile without
jumbo.

This commit enables jumbo for media/base.

Bug: 867350
Change-Id: Ie2dae0a65bfc596b30339712a39cab321e293f48
Reviewed-on: https://chromium-review.googlesource.com/1150037
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#578305}
oscarj
Move operator to namespace "media" (media/base)
When building using jumbo, the call:
s << " decrypt=" << (*decrypt_config_);
in media/base/decoder_buffer.cc does not
find the operator overload in:
media/base/decrypt_config.h
since it is not located within the same
namspace as DecryptConfig.

This commit solves the problem by moving
the operator overload to the namespace.

Bug: 867350
Change-Id: I92073b73cc52ac0bacc7446ce3d1389fef5f6c13
Reviewed-on: https://chromium-review.googlesource.com/1150164
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#578246}
bratell
[jumbo] Refactor and deduplicate some command_buffer constants
A couple of constants in the command_buffer code were duplicated
which caused symbol clashes in jumbo build experiments. This patch
tries to ensure each constant is only in the code once.

To make it possible to deduplicate kS3TCBlockWidth, ASTCBlockArray
and kASTCBlockArray, some validation code had to move from
gles2_cmd_decoder.cc to gl_utils.cc where there already were some
validators.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I4ffb28630a1900a9400f29690cfb802497550077
Reviewed-on: https://chromium-review.googlesource.com/1145308
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578244}
oscarj
Enable jumbo for media/mojo
Building //media takes around 23 CPU minutes. A experimental
branch showed that this could be reduced, by using jumbo,
to around 9 CPU minutes. media/mojo is the largest part
of media and takes around 5 CPU minutes to compile without
jumbo.

This commit enables jumbo for media/mojo.

Bug: 867350
Change-Id: Iad7e5957cc7f01110c4163c9d368f1f04496630a
Reviewed-on: https://chromium-review.googlesource.com/1149863
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#578232}
bratell
[jumbo] Declare a template specialization before using it
A quirk in C++ is that you can't specialize a template after it
has been "used" unspecialized in a translation unit. This would
happen in jumbo builds with
ApiResourceManager<EasyUnlockPrivateConnection>::GetFactoryInstance()
which is defined in easy_unlock_private_connection.cc but used
undeclared in easy_unlock_private_api.cc.

The fix is simple, just declare the specialization before it's used
and this patch adds that declaration to
easy_unlock_private_connection.h.

Bug: 850484
Change-Id: If5c12b67c92889a5c986b6a571d9895dea03cb6e
Reviewed-on: https://chromium-review.googlesource.com/1149860
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578061}
bratell
Fix link error for ViewProperties for Mac (!aura)
TBR=sky@chromium.org

Bug: 854704

Change-Id: I58fded8d7ad7c764e55ac435940ff0656a1d2aa5
Reviewed-on: https://chromium-review.googlesource.com/1150235
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#578006}
bratell
constexpr all the blink geometry types
With constexpr you make it slightly easier for the compiler to
optimize code, though the effect will be small.

Also, with constexpr types the compiler becomes better at telling
us when a variable is unused. This removes such variables.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I6b52edc7ef67167bf8b7864c97a5f57b50d85398
Reviewed-on: https://chromium-review.googlesource.com/1131509
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577950}
oscarj
Move function to util files (media/mojo)
When building using jumbo, files gets merged and functions
with the same name may end up in the same scope and conflict.

This commits moves such functions to shared util files,
instead of having duplicates.

Bug: 867350
Change-Id: I9986d6d653ef71acbf9583e18aa85a8e34f6e6f0
Reviewed-on: https://chromium-review.googlesource.com/1149781
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#577850}
oscarj
Remove unnecessary include (media/mojo/services)
When building using jumbo, files get merged together
and macros may end up in the same scope and conflict.
In media/mojo/services/test_mojo_media_client.cc a include
resulted in including ui/gl macros, which conflicted with
GLES2 macros.

This commit solved the issue by removing the include. The include
seems to be unnecessary and not used within the file.

Bug: 867350
Change-Id: I54f01bcd5d18b4acbaa231a5cf78a8b5e8f719e7
Reviewed-on: https://chromium-review.googlesource.com/1149862
Reviewed-by: Chrome Cunningham (In Paris) <chcunningham@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#577847}
bratell
[jumbo] Give two internal ui/gl functions unique names
MakeFunctionUnique and MockInvalidFunction are functions
that are generated twice by ui/gl/generate_bindings.py. With that
double generation the code can't be jumbo compiled because of
the resulting symbol clash when the code ends up in
a single translation unit.

This patch gives the functions unique names by adding the "set_name"
(gl, egl) to their names.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ia08d42a86b99bddc808d1ac7c921f6801eb07782
Reviewed-on: https://chromium-review.googlesource.com/1148453
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577800}
bratell
Switch ui/gl/gl_enums.cc from khronos GL to ui/gl
gl_enums used Khronos to get a definition of GL_NONE but
that broke jumbo build experiments because you cannot have
khronos headers and ui/gl headers in the same translation
unit.

This patch switches gl_enums.cc to use ui/gl/gl_bindings.h like
the rest of the code.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Id239ca4aa55278ac012c066d6a6f8e243b3ec319
Reviewed-on: https://chromium-review.googlesource.com/1148442
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577799}
bratell
Deduplicated a gpu code helper function to avoid jumbo clashes
There are three identical small ToGLuint functions which clashed
in jumbo build experiments. This moves it to gles2_cmd_utils.h and
changes the type to not add a dependency on GL in
command_buffer/common.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Iad7cfc8a2506b765ba7a93c2eb9dc59149e5b8f4
Reviewed-on: https://chromium-review.googlesource.com/1141944
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577499}
bratell
Delete temporary local AHardwareBuffer definition
While waiting for a newer ndk, some constants and types
were locally declared. Since January there is an NDK that contains
those types so the local declarations are not needed anymore

In some jumbo builds the local and ndk declaration clashed so it
is time to drop the local declarations, but keeping some types
still needed by the dynamic lookup of some (to be public) internal
functions.

Bug: 771171
Change-Id: Ie29ad63108b6c7aef857752daf6741902fdd749e
Reviewed-on: https://chromium-review.googlesource.com/1141735
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577237}
bratell
Switch shader_translator from khronos GL to ui/gl
In jumbo experiments build targets using both ui/gl+mesa and khronos
at the same time fail to compile because the two GL libraries
declare the same constants and functions.

This happened in gpu/command_buffer/service because ShaderTranslator
used khronos GL when it should have been using ui/gl. This patch switches
that code over to ui/gl.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I522243374eaf0416df58d84e20585c11aef3de32
Reviewed-on: https://chromium-review.googlesource.com/1145306
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577236}
oscarj
Enable jumbo for chrome/browser/ui
This commit will enable jumbo for chrome/browser/ui. This will
reduce the build time by approximately 90 CPU minutes (more
than 10 % of the total jumbo build time for chromium), compared to
building without jumbo.

Bug: 803406
Change-Id: I7774bd55378ea88dadcbf452679686e383bb15a2
Reviewed-on: https://chromium-review.googlesource.com/1143269
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577213}
oscarj
Rename kSeparatorWidth to be unique (browser/ui)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kSeparatorWidth in:
chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

This commit solves the issue by renaming the constants to
something more file specific. It also renames other variables
in the same namespace, so the naming is locally consistent.

Change-Id: I2ae24ce5b67372286a5aa4e48a0bc125606ff778
Reviewed-on: https://chromium-review.googlesource.com/1146641
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577166}
mharanczyk
Add missing deps to v8 binding test target to fix random build failures.
Random failures encountered so far can be reproduced by compiling
third_party/blink/renderer/bindings/core/v8:testing target on clean repo.

Change-Id: If92737cdfdc6f12533776b6ded935ac1a2689137
Reviewed-on: https://chromium-review.googlesource.com/1127040
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577137}
wdzierzanowski
Reset timestamp validator when config change is complete
When DecoderStream<DemuxerStream::AUDIO> encounters a config change it needs to
do two things, among others: flush the decoder and reset the audio timestamp
validator. It's important that it does the latter only after processing any
decoder output produced during the flushing.

This CL moves the responsibility of resetting the validator from
DecoderStream to DecoderStreamTraits<DemuxerStream::AUDIO>. It also adds
a test where the decoder's behavior of releasing internally buffered
samples upon flushing is mocked.

Bug: 865926
Test: New test AudioBufferStreamTest.FlushOnConfigChange doesn't fail assertions. No regressions in media_unittests.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I8cbb01df3792ca9de5db8ab637285d1e64188b39
Reviewed-on: https://chromium-review.googlesource.com/1145188
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#577123}
oscarj
Resolve include and define issues for jumbo (mac)
When building using jumbo, files get merged and variables,
functions and defines could end up in the same scope and
conflict. This commit solves issues with includes and defines
for the mac specific part of chrome/browser/ui.

Bug: 803406
Change-Id: I55d1f6110a6144bc7ee3037a374d3e33c36a9879
Reviewed-on: https://chromium-review.googlesource.com/1144928
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#577121}
bratell
[jumbo] undef SHADER macros after using them
Several files in gpu/command_buffer/service use local SHADER
macros. If they are compiled together in a jumbo build those
macros will collide and prevent the compilation.

This patch undefs the macros after use. An alternative is to
give them unique names.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I9de4011e1d609e5658a9d6cbe1775a3146364fa1
Reviewed-on: https://chromium-review.googlesource.com/1143265
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577044}
bratell
Reuse the logging glCompileShader instead of redefining it
Three files had their own logging glCompileShader wrapper named
CompileShader and in jumbo build experiments those clashed. This
makes that helper function shared, makes the logging a little more
accepting of long error messages, but loses a little bit of
information about where the code was called from.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: If7e518cc993e165c2f51c4b32a7f1df96d31ad5d
Reviewed-on: https://chromium-review.googlesource.com/1143266
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#577004}
bratell
Clarify which of ::base and ::angle::base is intended
There is a namespace base inside the namespace angle so when
writing code inside angle, "base" is ambigious.

This triggered a compilation failure in some jumbo experiments where
the compiler knew about both ::angle::base and ::base.

There are guides to not name inner namespaces the same as common
top level namespaces for this reason but I guess renaming
angle::base is not an option.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I7c780aea3408d11082a96baa729f2cc0b6dd3247
Reviewed-on: https://chromium-review.googlesource.com/1144936
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#576892}
oscarj
Rename constants to be unique (mac)
When building using jumbo, files gets merged and constants
with the same name may end up in the same scope and conflict.

This commit solves the issue by renaming the constants to
something more file specific.

Bug: 803406
Change-Id: I70976f012e9be6f395d4bfcc43e785515071ebb3
Reviewed-on: https://chromium-review.googlesource.com/1142783
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576511}
oscarj
Move functions and constants to util files (mac)
When building using jumbo, files gets merged and functions and
constants with the same name may end up in the same scope.
This commits moves such functions and constants to shared
util files.

Bug: 803406
Change-Id: I3a0d763741c3d6b631539fdfe51f8fddc0b255a0
Reviewed-on: https://chromium-review.googlesource.com/1141865
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sidney San Martín <sdy@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#576502}
bratell
Avoid "using namespace gles2" in the gpu code
Jumbo isn't compatible with "using namespace" since those cause
compiler warnings unless in the top level file, but "using namespace"
is also prohibited by the code style guide (see:
https://google.github.io/styleguide/cppguide.html#Namespaces )

This makes the code a bit more verbose, but it also makes it
more self consistent since the gles2:: prefix was already
occasionally used.

Bug: 864986
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I7c2111e70407a7ddf65473cb83e7f63b70b18747
Reviewed-on: https://chromium-review.googlesource.com/1141882
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#576159}
oscarj
Make variable names unique (mac)
When building using jumbo, files gets merged and
variables with the same name may end up in the same
scope. This commit renames such varaibles to something
more descriptive or file specific.

Bug: 803406
Change-Id: Ia43af0d95b0693ce917722397bc23db655441c29
Reviewed-on: https://chromium-review.googlesource.com/1141579
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#576139}
oscarj
Specify class type before calling setCornerFlags (mac)
Specifying what subclass of NSView being called,
in this  case BubbleView.

Bug: 803406
Change-Id: Iabc0a02ab17a881993f34b9c120978ca7f45264c
Reviewed-on: https://chromium-review.googlesource.com/1141879
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#576137}
bratell
Don't use split_static_library when lld is used
split_static_library is mainly a fix to avoid hitting internal
size limits in the Windows toolchain and it's not needed when
using lld because its thin archives are orders of magnitude smaller.

Bug: 857060
Change-Id: Idf101fc57d5fed8ee8644715fdebb879f7974da6
Reviewed-on: https://chromium-review.googlesource.com/1138330
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576067}
bratell
Use MobileScroller instead of cloning it.
Chromecast wants to scroll exactly like Android and for that
the code cloned the mobile scrolling code, but simpler and
easier and with less code and fewer jumbo compilation errors
is to just use the existing code directly.

Only a minor code difference existed and that is controlled with
a conditional statement instead now.

Bug: 813911
Change-Id: I9d037da9b58c1ad0916dc22ee194328c113075cd
Reviewed-on: https://chromium-review.googlesource.com/1136541
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Kevin Schoedel <kpschoedel@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#576035}
oscarj
Fix typo in SadTabViewCocoa (from SabTabViewCocoa)
The class SadTabViewCocoa has a typo and is currently
named SabTabViewCocoa. This commit renames the class
to the correct name.

TBR=avi@chromium.org

Bug: 803406
Change-Id: Id290fe8d016fe0fae9c760cb556e7c8896d17426
Reviewed-on: https://chromium-review.googlesource.com/1141569
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#575986}
oscarj
Resolve name conflict between regular and cocoa classes
When building using jumbo, files may end up in the same scope.
In chrome/browser/ui, ui elements defined with the same name in
both browser/ui and  browser/ui/cocoa conflict. This is relevant
for the classes:

HoverButton
ReloadButton
TabStripController
TabController
NewTabButton
BookmarkBarView
DownloadShelfViewCocoa
ToolbarButton
AvatarButton
SadTabView
AlertIndicatorButton
ToolbarView

This commit solves the issue by adding "Cocoa" to the classes
defined in chrome/browser/ui/cocoa. This is changed in
chrome/browser/ui/cocoa and ui/base/cocoa.

Bug: 803406
Change-Id: Iafd3b9447e4ed6960d86d43d12213ad367919357
Reviewed-on: https://chromium-review.googlesource.com/1140055
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#575959}
bratell
[jumbo] Merged two GetActiveTextureUnit functions
In jumbo build experiments, two (identical but small)
GetActiveTextureUnit() functions ended up in the same translation
unit which caused the compiler to fail.

This patch moves the useful function into a shared utility file.

Bug: 801580
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: Id6f8f1002db18593150bec30f1e8b7092f464e13
Reviewed-on: https://chromium-review.googlesource.com/1136308
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#575721}
oscarj
Specify sender type before changing state (browser/ui/cocoa)
Instead of using id as sender type this commit specifies which
types that are possible to recieve.

Bug: 803406
Change-Id: If5a6cfb0c0788b1e2a9e911ae05e9f7dc5e3840d
Reviewed-on: https://chromium-review.googlesource.com/1140166
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575637}
oscarj
Make category names unique for interfaces (browser/ui)
When building using jumbo, interfaces and implementations
end up in the same scope. The interfaces with the same
category name conflicts.

This commit solves the issue by renaming the category to
something more file specific.

Bug: 803406
Change-Id: I21a6645640d40b0ed6cd1324dfc30efa87da23c0
Reviewed-on: https://chromium-review.googlesource.com/1140162
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#575624}
bratell
Use :: prefix to distinguish between ::media_router::prefs and ::prefs
There are two namespaces named prefs in scope inside media_router code:
The global ::prefs namespace and the local ::media_router::prefs namespace.

If both namespaces are known to the compiler, as happens in jumbo builds,
then the name lookup will be ambigious and the compiler will fail to
compile the code.

Bug: 803406
Change-Id: Ib4be547ffe1ba7a790c2003fd54bd091935c378e
Reviewed-on: https://chromium-review.googlesource.com/1138244
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575379}
bratell
[jumbo] Deduplicate a time constant in autofill code
Two different bubbles needed the same time constant and when
they got copies of the constant that broke certain jumbo
builds. This merges the constants to a single constant.

It also changes type to base::TimeDelta which is the actual
type needed and since the addition of constexpr can be used
in global constants.

Bug: 852904,862397
Change-Id: I52a63d3301efb1c7aec55541c15427c5d96ba524
Reviewed-on: https://chromium-review.googlesource.com/1134998
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Mathieu Perreault <mathp@chromium.org>
Reviewed-by: Mathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574578}
fs
Remove the 'double' methods from blink::TimerBase
Remove the methods in blink::TimerBase that either take or return
a time delta as a double. These methods are mostly unused - a few calls
to StartOneShot and NextFireInterval, and it should be preferable for
new code to use the TimeDelta methods. The non-Delta-suffixed names are
kept - i.e they take on the name of their removed equivalent where
applicable.

The few users of StartOneShot(double, ...) are open-coded instead, and
uses of other methods are adjusted as needed.

The unit tests for Timer is overhauled to use TimeTicks and TimeDelta
throughout.

Bug: 763980
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I47c0449a9ea68e6e984c371e19f03f747bb5b1e0
Reviewed-on: https://chromium-review.googlesource.com/1131131
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574127}
bratell
Hide syslog's LOG_INFO from the rest of the code
Both syslog and the base namespace have LOG_INFO symbols and
in certain cases (which include, but is not limited to,
jumbo builds) those will clash.

This patch undefs the syslog LOG_INFO macro
as is already done with LOG_WARNING previously.

Change-Id: Iff59a2ef079d3bb38378af76932b21a128507353
Reviewed-on: https://chromium-review.googlesource.com/1027611
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574103}
tmoniuszko
Add missing include for views::CreateEmptyBorder
Change-Id: I5558e93ca31e5ab546457b0e07a73e5f1a60c614
Reviewed-on: https://chromium-review.googlesource.com/1125074
Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#574095}
fs
Fix propagation of 'width' and 'height' in HTMLImageFallbackHelper
Use CSSValue::Create(const Length&, ...) to produce values in unzoomed
coordinates. This handles for instance calc(...) expressions correctly.

Bug: 860204
Change-Id: I30e639c38dc49795d44a5e28cc1bf01734543730
Reviewed-on: https://chromium-review.googlesource.com/1126307
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#573893}
fs
Remove unused LayoutImage::kPadding{Width,Height}
Probably managed by the HTMLImageFallbackHelper/UA shadow nowadays.

Change-Id: I6d70bafb0247f186a7c5e119f0368497d22c2dc6
Reviewed-on: https://chromium-review.googlesource.com/1131734
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#573825}
bratell
Forbid implicit conversions from IntPoint to FloatPoint
This is a followup from an analogous change for IntRect and FloatRect which was triggered
by some unintended conversions happening.
Since FloatPoint is not a perfect superset of IntPoint, converting from IntPoint to
FloatPoint is potentially lossy, and conversions that happen by accident hide that APIs
are not used as intended.

Behaviour has been kept where it's not obviously a mistake. Truncating or snapping to
integers is sometimes beneficial.

R=fs@opera.com, pdr@chromium.org

Bug: 860535

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I84e72a890dbddc2a9f40bb25a000f7eec75f6ffa
Reviewed-on: https://chromium-review.googlesource.com/1126396
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#573675}
fs
Scrub line-endings in chrome/browser/ui/views/tabs/tab.cc
93e913c148a1a54557c8b29517a4be2eab7949ea added mixed line-endings,
making git unhappy. Remove the excess carriage returns (CRs.)

Tbr: pkasting@chromium.org
Bug: 859585
Change-Id: Ied4e1465491679a607c9f273da0c3d8cbc6be499
Reviewed-on: https://chromium-review.googlesource.com/1130528
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#573673}
bratell
[jumbo] Resolve Windows conflict between Win32 API and OpenSSL headers
Windows head wincrypt.h and OpenSSL use the same constants so we can't
include wincrypt.h directly or indirectly. In
content/renderer/gpu/gpu_benhcmarking_extension.cc we include
the Windows header XpsObjectModel.h which includes msopc.h which
includes wincrypt.h which causes problems in some jumbo configuratons.

This patch makes sure to include crypt/wincrypt_shim.h first so that
the include of wincrypt in msopc.h does nothing.

Bug: 860646
Change-Id: Ieda7096234575b8d1fda8af2a103972632e0f6d2
Reviewed-on: https://chromium-review.googlesource.com/1127786
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#573672}
oscarj
Resolve multiple definitions of GetSequenceValue
When building using jumbo unnamed namespaces gets merged
and functions with the same name conflict. This happens
for the function GetSequenceValue in
net/cert/internal/parsed_certificate.cc and
net/cert/x509_certificate.cc.

This commit solves the issue by renaming the function to
something more file specific.

Bug: 772146
Change-Id: Ic8609a3c5a75b8187a58d3891eb3d8d32650fa76
Reviewed-on: https://chromium-review.googlesource.com/1118276
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573651}
oscarj
Fix line endings when writing bookmark URLs to clipboard.
Add "\r\n" instead of "\n" when copying multiple bookmark
URLs on Windows.

Bug: 861717
Change-Id: I0d15a8662bbb27ee67b899ea805ddd5b147be71f
Reviewed-on: https://chromium-review.googlesource.com/1128879
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#573646}
fs
Fix handling of 'auto' for 'rx' and 'ry' on <ellipse>
Per the spec[1][2], when 'auto' is specified for 'rx' or 'ry' the used
value of said property will be the used value of the other property
('rx' for 'ry' and vice versa.)

[1] https://svgwg.org/svg2-draft/geometry.html#RX
[2] https://svgwg.org/svg2-draft/geometry.html#RY

Bug: 861585
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iec0a9179527a5b0e99cc6a0ec671e5b6d92f828b
Reviewed-on: https://chromium-review.googlesource.com/1128885
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#573457}
fs
Eliminate HitTestResult::is_rect_based_test_
This flag should be a copy of the same flag in an associated
HitTestLocation. In all cases where it is used we have said
HitTestLocation and can use the flag from there instead.

The most complicated case - HitTestResult::ResolveRectBasedTest - will
return a HitTestLocation with the flag cleared, which should mean that
the state invariant is maintained. EventHandlingUtil::HitTestResultInFrame
as changed to take a HitTestLocation to be able to maintain this invariant
a little easier.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8b8d17a4fabca725ec089f18550523a19b677c75
Reviewed-on: https://chromium-review.googlesource.com/1127939
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573441}
fs
Use TimeDelta for a bunch of timer durations/timeouts
Most of these changes are of the (int|unsigned|double) -> TimeDelta
type.

In a few cases (EventSource, GeoNotifier, VibrationController), an
invocation of StartOneShot(double, ...) is changed to a
StartOneShot(TimeDelta, ...) with an appropriate TimeDelta::From...
conversion (all for milliseconds even.)

In some cases names of constants are changed to remove the unit, since
that's no longer meaningful.

EventHandler::TargetGestureEvent was doing an unnecessary conversion, so
just drop that.

Remove the GeoNotifier::Timer::StartOneShot(double, ...) overload since
it's no longer used.

Bug: 763980
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie5b117500db400da60faba0e308bc1644c26992d
Reviewed-on: https://chromium-review.googlesource.com/1127785
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#573359}
fs
Use TimeDelta in FirstMeaningfulPaintDetector
This changes the |network2_quiet_window_seconds_| and
|network0_quiet_window_seconds_| fields from double to TimeDelta,
renaming them to not have 'seconds' in the name (replaced by 'timeout'.)

Adjust the unit test, and replace AdvanceClockSeconds with AdvanceClock
throughout.

Add a new TestingPlatformSupportWithMockScheduler::RunForPeriod,
mimicking the setup for AdvanceClock{,Seconds}.

Bug: 763980
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9316759a30c6fbe3fb4d7ea15106d6c47366ba33
Reviewed-on: https://chromium-review.googlesource.com/1127779
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573298}
fs
Use Time{Delta,Ticks} in LayoutProgress
Make |animation_start_time_| TimeTicks and |animation_repeat_interval_|
and |animation_duration_| TimeDelta to match semantics.

Update AnimationDurationForProgressBar and
AnimationRepeatIntervalForProgressBar in LayoutTheme to return
TimeDelta.

Bug: 763980
Change-Id: I3134116861dce6bdf0be050870cba25b0ef56e68
Reviewed-on: https://chromium-review.googlesource.com/1127780
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573291}
fs
Use TimeDelta in Scrollbar/ScrollableArea/ScrollbarTheme
Straightforward conversion in Scrollbar and ScrollableArea.

In ScrollbarTheme, OverlayScrollbarFadeOutDelaySeconds,
OverlayScrollbarFadeOutDurationSeconds, InitialAutoscrollTimerDelay and
AutoscrollTimerDelay are changed to return TimeDelta. The "Seconds"
suffix is dropped from the two earlier methods.

Bug: 763980
Change-Id: Idf1a8b1e44db18427db7a9acebd09f63be2c4cdc
Reviewed-on: https://chromium-review.googlesource.com/1127781
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573274}
bratell
Forbid implicit conversions from IntRect to FloatRect
This is a followup from removing some accidental conversions via FloatRect. Since
FloatRect is not a perfect superset of IntRect, converting from IntRect to FloatRect is
potentially lossy, and conversions that happen by accident hide that APIs are not used
as intended.

A few new helper functions that use IntRect were added to make the change smaller, but
there is potential for future further cleaning up of what types are used where, and how.

Behaviour has been kept where it's not obviously a mistake. Truncating or snapping to
integers is sometimes beneficial.

R=fs@opera.com, pdr@chromium.org

Bug: 860535

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I733b4273b847654f22bae726255cfb75ba8023bb
Reviewed-on: https://chromium-review.googlesource.com/1124454
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#573263}
oscarj
Resolve namespace scope issue for "switches"
When building using Jumbo files gets merged.
This results in a conflict with the namespace switches in:
chrome/browser/extensions/bookmark_app_helper.cc
chrome/browser/extensions/extension_util.cc

This commit solves this by specifying that the global
namespace should be used, by adding the "::" prefix.

Bug: 850484,856964,860646
Change-Id: I6b7b8343bb66ea5c8a5796f77b85c882085f5d93
Reviewed-on: https://chromium-review.googlesource.com/1127661
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#573000}
bratell
Add desktop_window_tree_host_win.h to ui/views' public api
The file desktop_window_tree_host_win.h is used by chrome/browser/ui/views
(apps/app_window_desktop_window_tree_host_win.h,
frame/browser_desktop_window_tree_host_win.h, ime/ime_window_view.cc and
tabs/window_finder_win.cc) so it's part of the external API of ui/views
and the file needs to be listed as such in the "public" part of the target.

This error is detected by gn gen --check in some builds and not in others.
I think it has gone undetected because with split_static_library you get
an empty public list for the part where this file belongs. No |public|
list means that all of |sources| is public. Or something similar.

(Fix by oscarj who had to leave for the weekend)

Change-Id: If6b5805bdd20c988e45b132dd680bb73b667e16c
Reviewed-on: https://chromium-review.googlesource.com/1127943
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#572989}
fs
Use TimeDelta in media controls/PiP
Straightforward double -> TimeDelta conversion. Names of constants have
been changed to remove any unit (like "...Seconds") - often replaced by
"...Duration". "Trans" was also expanded to "Transition" in a few
places.

Bug: 763980
Change-Id: I1b193ecf338245c5873f002c0cfcd1b679b345d7
Reviewed-on: https://chromium-review.googlesource.com/1127782
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572971}
bratell
Removing intermediate IntPoint objects when FloatPoint is needed
Sometimes (probably for historical reasons), IntPoint objects
are created where FloatPoint objects are needed. The IntPoint will
(still) be converted to a FloatPoint by the compiler so all that
happens is that the code takes an unnecessary detour.

Need to be careful so that we don't depend on some truncation
performed by the detour via integers.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia3b90f2a80cb7a65cfdf78c1370bea0acb79491d
Reviewed-on: https://chromium-review.googlesource.com/1126397
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#572961}
bratell
Renamed a method named Service since there is a class Service
There is a class Service in services/content/service.h which
makes it unsuitable to have other symbols named Service in
content. There was a local helper function named Service in
content/browser/notifications that caused a clash in jumbo builds
and this patch renames that method NotificationService()

Change-Id: I268c3afb3c5cc43315f0638f9685579d1fe1dcf9
Reviewed-on: https://chromium-review.googlesource.com/1118174
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572774}
fs
Move ImageResourceContent::BrokenCanvas to a better place
This function has no association with ImageResourceContent, so move it
to html_canvas_element.cc where it's only user resides.

Change-Id: I22e50d0f526f150957aec262452c7f1dfcf612e5
Reviewed-on: https://chromium-review.googlesource.com/1120332
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572751}
fs
Replace uses of RepeatInterval() in DOMTimer with RepeatIntervalDelta()
RepeatInterval() is used in DOMTimer::Stop and DOMTimer::Fired to
determine if the timer is an interval timer or not. This can trivially
use the TimeDelta version instead.

Also use g_null_atom to pass a null AtomicString, rather than creating
a temporary.

Bug: 763980
Change-Id: I7b191ab7b99d22f73974b7b448b059c2f8cb51ef
Reviewed-on: https://chromium-review.googlesource.com/1125930
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572631}
fs
Use TimeDelta in PausableTimer
Mostly s/double/TimeDelta/ and Method() to MethodDelta(). The
kNextFireIntervalInvalid constant is changed to TimeDelta::Min().

Bug: 763980
Change-Id: I878a4136edcfe815184e7021a19eefffbc02fd31
Reviewed-on: https://chromium-review.googlesource.com/1125919
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572612}
fs
Use NextFireIntervalDelta instead of NextFireInterval in SVGImage*Test
Avoids run-tripping TimeDelta -> double -> TimeDelta.

Bug: 856082
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If4a6a0626be6341770ef01d368fc8a1ddf00de31
Reviewed-on: https://chromium-review.googlesource.com/1126115
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572560}
bratell
Avoid converting via or creating IntRect when we want a FloatRect
It's currently easy to use an IntRect when a FloatRect is needed
since there is an implicit (lossy) conversion from IntRect to
FloatRect. This patch changes some code to remove some
unnecessary conversions between the types.

(A float can store all integers up to, but not including,
16,777,217 so it the conversion is most of the time non-lossy)

R=fs@opera.com, pdr@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I324b79c3d78d387574f47a4bda8f7dc7bdad567b
Reviewed-on: https://chromium-review.googlesource.com/1124682
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#572306}
fs
Scale the viewport size in SVGImagePainter
LayoutImageResource::GetImage expects a zoomed container size (it passes
it unmodified to SVGImageForContainer::Create which unzooms it), so we
need to scale the viewport size before passing it.

Bug: 859774
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I24f7f0b1f402aaef112882ab146d573981889cae
Reviewed-on: https://chromium-review.googlesource.com/1124163
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572190}
bratell
Give a global factory a globally unique name
There are two g_previews_factory now which causes issues with
some jumbo builds. This renames one of them
g_previews_service_factory.

Change-Id: I05d4ab366239888e80fb32f782ac4e4880a8609f
Reviewed-on: https://chromium-review.googlesource.com/1122131
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#572143}
oscarj
Move kDefaultNumConnections (net/)
When building using jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variable kDefaultNumConnections in:
net/third_party/quic/core/congestion_control/cubic_bytes.cc
net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.cc

This commit solves the issue by moving the variable
definition to net/third_party/quic/core/quic_constants.h.

Bug: 772146
Change-Id: Ib7c961511823a8ecbc996775485a5fe23649e65e
Reviewed-on: https://chromium-review.googlesource.com/1120169
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#572123}
fs
Reland "Suspend SVG image animations when the page is hidden"
Check Document::hidden() in LayoutObject::WillRenderImage,
thus pausing animations on pages that are not visible.
To resume animations, we may need to explicitly resume the
timeline, so a hook is added in Page::SetVisibilityState to
allow calling StartAnimation() on the relevant SVGImages.

Update: Added RunPendingTasks() to test to make sure the later
code is actually waiting for a proper animation frame.

Tbr: chrishtr@chromium.org
Bug: 856082
Change-Id: I457fc0b92576edf7d70933373d12d49d52a0b912
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1122413
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#571904}
oscarj
Move constants from namespace to class (browser/ui)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kStartPadding and kEndPadding in
chrome/browser/ui/views/download/download_item_view.cc
and chrome/browser/ui/views/download/download_shelf_view.cc.

This commit solves the issue by moving the variables from
the namespace to the class. It also moves other variables
in the same namespace, to keep the files locally consistent.

Bug: 773275
Change-Id: I8d23ae9999fe404d253a3a189e6d17d81786939d
Reviewed-on: https://chromium-review.googlesource.com/1107063
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571901}
oscarj
Rename local kColor constants (browser/ui)
When building using jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kFooterBackgroundColor and kSeparatorColor
in ui/views/autofill/autofill_popup_view_native_views.cc and
ui/views/passwords/password_generation_popup_view_views.cc.

This commit solves the issue by renaming the constants to
something more file specific. It also renames other variables
in the same namespace, so the naming is locally consistent.

Bug: 773275
Change-Id: I3f71efeaa29eccdbe646e7c2fb512f218c2f010a
Reviewed-on: https://chromium-review.googlesource.com/1118260
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571897}
bratell
Don't convert IntRect -> FloatRect -> IntRect.
If EnclosingIntRect() is called on an IntRect it is first
converted to a FloatRect or DoubleRect since that is what
EnclosingIntRect() is used for. Then you (hopefully) get
the originally IntRect back.

This strange conversion wasn't obvious in the code because the
type of the IntRect was hidden by an |auto|. It was discovered in
jumbo builds because the compiler had access to both DoubleRect
and FloatRect and didn't know which one to use.

Bug: 843606
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1ca799cc27da02e1c6615bf403bc190fec1d5cde
Reviewed-on: https://chromium-review.googlesource.com/1122219
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#571887}
oscarj
Rename function NetLogEntryCreationCallback (net/)
When building using Jumbo namespaces with the same name
gets merged and functions with the same name conflict.
This happens for the function NetLogEntryCreationCallback
in:
net/disk_cache/net_log_parameters.h
net/disk_cache/memory/mem_entry_impl.cc

This commit solves the issue by renaming the function in
net/disk_cache/net_log_parameters. Also renames
CreateNetLogEntryCreationCallback to keep names
consistent.

Bug: 772146
Change-Id: Ice0a53054dbf2ded14728d48a7fd7b33bfe0d5a5
Reviewed-on: https://chromium-review.googlesource.com/1120180
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571881}
oscarj
Remove "using base::File" to avoid conflict (net/)
When building using Jumbo namespace aliases with the same
name may end up in the same unit, causing a conflict at
compilation. This happens for base::File and
disk_cache::File in:
net/disk_cache/simple/simple_index_file.cc
net/disk_cache/simple/simple_synchronous_entry.cc

This commit removes "using base::File" and
instead call the namespace by its full
name.

Bug: 772146
Change-Id: I7385edf04bc23d519ee8800bc4941807a85340ad
Reviewed-on: https://chromium-review.googlesource.com/1120252
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571880}
oscarj
Rename kNoPendingResult to be unique (net/)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kNoPendingResult in:
net/socket/ssl_client_socket_impl.cc
net/socket/ssl_server_socket_impl.cc

This commit solves the issue by renaming the constants to
something more file specific.

Bug: 772146
Change-Id: I918d551970e249fbb5e0bfadf0ebaeae99ffebcb
Reviewed-on: https://chromium-review.googlesource.com/1119916
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571852}
oscarj
Rename function ParseCertificate to be unique (net/)
When building using Jumbo unnamed namespaces gets merged
and functions with the same name conflict. This happens
for the function kParseCertificate defined in:
net/cert/internal/ocsp.cc
net/cert/internal/parse_certificate.cc

This commit solves the issue by renaming the function in
net/cert/internal/ocsp.cc.

Bug: 772146
Change-Id: I071682c8f330183f637a7985061980b6aa34c93a
Reviewed-on: https://chromium-review.googlesource.com/1119911
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571848}
oscarj
Move kVlog constants to util file (net/)
When building using jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variable kVlogSetCookies in
net/cookies/canonical_cookie.cc and
net/cookies/cookie_monster.cc.

This commit solves the issue by moving the variable
definition to net/cookies/cookie_util.h. Other
kVlog variables defined in net/cookies/cookie_monster.cc
are also moved.

Bug: 772146
Change-Id: I850c27406f687dfffcf682b0957a41ecbeaca291
Reviewed-on: https://chromium-review.googlesource.com/1118382
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571842}
oscarj
Move kMaxSegmentSize to constant file (net/)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kMaxSegmentsSize in:
net/third_party/quic/core/congestion_control/bbr_sender.cc
net/third_party/quic/core/congestion_control/prr_sender.cc

This commit solves the issue by moving the constant to
net/third_party/quic/core/quic_constants.h.

Bug: 772146
Change-Id: I07da21c2bc8c96f6ed5cc83e2724ae948d80a9be
Reviewed-on: https://chromium-review.googlesource.com/1119689
Commit-Queue: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571814}
fs
Revert "Suspend SVG image animations when the page is hidden"
This reverts commit b56e2510d08c0a8fd0be69ad29a2558c6ce63523.

Reason for revert: Test flaky on cast_shell_linux

Original change's description:
> Suspend SVG image animations when the page is hidden
> 
> Check Document::hidden() in LayoutObject::WillRenderImage,
> thus pausing animations on pages that are not visible.
> To resume animations, we may need to explicitly resume the
> timeline, so a hook is added in Page::SetVisibilityState to
> allow calling StartAnimation() on the relevant SVGImages.
> 
> Bug: 856082
> Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I4a0b008730ec3e6c2af26e15d52eebb26020ad32
> Reviewed-on: https://chromium-review.googlesource.com/1115130
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Commit-Queue: Fredrik Söderquist <fs@opera.com>
> Cr-Commit-Position: refs/heads/master@{#571543}

TBR=fs@opera.com,chrishtr@chromium.org

Change-Id: I53a07f59bf48095c21ccf6eb357162786012ad1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 856082
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1120976
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#571587}
fs
Suspend SVG image animations when the page is hidden
Check Document::hidden() in LayoutObject::WillRenderImage,
thus pausing animations on pages that are not visible.
To resume animations, we may need to explicitly resume the
timeline, so a hook is added in Page::SetVisibilityState to
allow calling StartAnimation() on the relevant SVGImages.

Bug: 856082
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I4a0b008730ec3e6c2af26e15d52eebb26020ad32
Reviewed-on: https://chromium-review.googlesource.com/1115130
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#571543}
oscarj
Resolve macro CACHE_UMA_BACKEND_IMPL_OBJ (net/)
The macro CACHE_UMA_BACKEND_IMP_OBJ is defined
in:
net/disk_cache/blockfile/backend_impl.cc
net/disk_cache/blockfile/entry_impl.cc

When building using jumbo these end up in the same
scope and conflict. This commit solves the issue
by undefining the macro at the end of the file.

Bug: 772146
Change-Id: Ib888216156c3054616f6e906e6c23a648154d2d9
Reviewed-on: https://chromium-review.googlesource.com/1118273
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571453}
oscarj
Rename kBeta to be unique (net/)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kBeta in:
net/third_party/quic/core/congestion_control/cubic_bytes.cc
net/third_party/quic/core/congestion_control/rtt_stats.cc

This commit solves the issue by renaming kBeta in
net/third_party/quic/core/congestion_control/cubic_bytes.cc
to kDefaultCubicBackoffFactor to avoid the conflict and
to give the variable a more descriptive name.

Bug: 772146
Change-Id: Ibc2e6732d2c5fa70672a73e7b6669d8b71f581d1
Reviewed-on: https://chromium-review.googlesource.com/1119691
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571452}
oscarj
Resolve RETURN_STRING_LITERAL macro conflict (net)
The macro RETURN_STRING_LITERAL is defined in namespaces in:
net/third_party/quic/core/crypto/crypto_utils.cc
net/third_party/quic/core/quic_error_codes.cc
net/third_party/quic/core/quic_utils.cc
net/third_party/quic/core/quic_versions.cc

When building using jumbo these end up in the same
namspace and conflict. This commit solves the issue
by undefining the macro inside the namespace.

Bug: 772146
Change-Id: Ibb07acd829f8ad2867748d1db8aba5aa59a39e47
Reviewed-on: https://chromium-review.googlesource.com/1118222
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571450}
oscarj
Resolve LogSeverity macro/typedef conflict (browser/extensions)
LogSeverity is a typedef in base/logging.h and a macro
in the Windows header setupapi.h. When building using jumbo
this causes a conflict.

This commit solves the issue by undefining LogSeverity after importing
setupapi.h.

Bug: 850484,856964
Change-Id: I3e56c1a06357d8e03dbc98e01e51b18ae05e94dc
Reviewed-on: https://chromium-review.googlesource.com/1116790
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571436}
oscarj
Resolve ENDPOINT macro conflict (net/)
The macro ENDPOINT is defined inside namespaces in:
net/third_party/quic/core/quic_connection.cc
net/third_party/quic/core/quic_crypto_handshaker.cc
net/third_party/quic/core/quic_crypto_stream.cc
net/third_party/quic/core/quic_data_reader.cc
net/third_party/quic/core/quic_framer.cc
net/third_party/quic/core/quic_packet_creator.cc
net/third_party/quic/core/quic_sent_packet_manager.cc
net/third_party/quic/core/quic_session.cc
net/third_party/quic/core/quic_spdy_stream.cc

When building using jumbo these end up in the same
namspace and conflict. This commit solves the issue
by undefining the macro inside the namespace.

Bug: 772146
Change-Id: Ie85920ac632dd90402afc2276ed30fff8609d9be
Reviewed-on: https://chromium-review.googlesource.com/1118220
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571418}
oscarj
Move kTitleIconSize to class member (browser/ui)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kTitleIconSize in
views/ime/ime_window_frame_view.cc,
views/relaunch_notification/relaunch_recommended_bubble_view.cc
and views/relaunch_notification/relaunch_required_dialog_view.cc.

This commit solves the issue by moving the variables from
the namespace to the class. It also moves other variables
in the same namespace, to keep the files locally consistent.

Bug: 773275
Change-Id: I0ec9b735f6f6c579bebe61ab6a1a8cfcac876f56
Reviewed-on: https://chromium-review.googlesource.com/1107619
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571196}
fs
Use DataEquivalent(...) when comparing StyleSVGResources
While the underlying SVGResource should be unique (or nullptr - for
invalid cases), the StyleSVGResource wrapper usually isn't. Hence we
need to use DataEquivalent(...) to properly determine equality.

Bug: 769774, 855914
Change-Id: I333bc7a737d0635aabe35e39bb066edbc4282790
Reviewed-on: https://chromium-review.googlesource.com/1118219
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#571099}
oscarj
Resolve LocationBarDecoration conflict(browser/ui)
LocationBarDecoration is defined as a struct in
chrome/browser/ui/views/location_bar/location_bar_layout.h
and as a class in
chrome/browser/ui/views/location_bar/location_bar_layout.h.
When building using jumbo this causes a conflict.

This commit solves the issue by renaming the struct to
DecorationInfo.

Bug: 773275
Change-Id: Iaeece5319fe66b335cf1dcda01f3d984f0cc5f7a
Reviewed-on: https://chromium-review.googlesource.com/1116797
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571063}
oscarj
Rename local kError constants to be unique
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
when building in Chrome OS for the variables
kErrorNotAvailable in:
chrome/browser/extensions/api/input_ime/input_ime_api.cc
chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc

This commit solves the issue by renaming the variables to
something more file specific. It also renames other variables
in the same namespace, so the naming is locally consistent.

Bug: 850484
Change-Id: Id2282be73d75c76bb820c0946fc1caf09aeca8a4
Reviewed-on: https://chromium-review.googlesource.com/1116698
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571043}
oscarj
Resolve issues with WRITE_RESULT constants (net/)
When building using jumbo the WRITE_RESULT constants
defined in net/disk_cache/memory/mem_entry_impl.cc
and in net/disk_cache/simple/simple_entry_impl.cc
conflict with each other.

This commit solves the issue by renaming the constants to
something more file specific.

Bug: 772146
Change-Id: I118bea2e4943983975640ce178a48adb597f25f3
Reviewed-on: https://chromium-review.googlesource.com/1117066
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#571042}
bratell
Make it one blink/gpu/mojom conversion function instead of three
There were three identical SharedBitmapIdToGpuMailboxPtr functions
which converted from viz::SharedBitmapId to
gpu::mojom::blink::MailboxPtr and those clashed in jumbo builds,

This patch makes all code use the same shared copy in
canvas_resource.cc

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic7980af0aa30d7cc90acac1d0846f626ad58671d
Reviewed-on: https://chromium-review.googlesource.com/1104461
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#570705}
bratell
Revert "jumbo: stable assignment of inputs to chunks"
This reverts commit 2c7a71c3fd6cc3ee5eda41467ea6d5b8ee337386.

Reason for revert: Linux with chunk size 50 broke in v8 which we
can't quickly fix, and Windows (chunk size 8) has a DWORD logging
error that looks non-trivial. We need to fix those before landing
this.

Original change's description:
> jumbo: stable assignment of inputs to chunks
> 
> Adding or removing a file from a jumbo source set causes on average
> half of the chunks to have their inputs reallocated.
> Derive chunk boundaries from a combination of list position and path
> content. This is so that when a file is added or removed, only the
> boundaries with adjacent chunks typically move.
> For a balance between maximum chunk size and stability of partitions:
> * Partition uniformly into the required number of chunks.
> * Pick a "center" from each chunk by minimum hash value.
> * Pick the boundaries between centers by maximum hash value.
> 
> Bug: 782863
> Change-Id: Ie71d82b132e8145b4ed3d1141f85886a12149d5a
> Reviewed-on: https://chromium-review.googlesource.com/1102218
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Daniel Bratell <bratell@opera.com>
> Commit-Queue: Dirk Pranke <dpranke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#570623}

TBR=dpranke@chromium.org,bratell@opera.com,brucedawson@chromium.org,david.barr@samsung.com

Change-Id: I8c81aca34ab2876aebea6b54e847cb24be3aa27f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 782863
Reviewed-on: https://chromium-review.googlesource.com/1116658
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#570701}
oscarj
Replace magic constant with kFixedSize
When calling certain functions in GridLayout a resize
parameter is passed, defining how much the layout should
resize.
Most often it is passed as 0 or 1. Sometimes 100 (which
is assumed to be the same as 1) and sometimes 0.5.

This commit defines the variable kFixedSize = 0.f
in grid_layout.h and remove every local defintion of
the variables. The magic constant are replaced by this
variable. The replacements are:
0, 0.f and 0.0f becomes kFixedSize (0.f)

This commit affects chrome/browser/ui.

Bug: 854186
Change-Id: I287b1b38350a2dce2bd6e02cc871e82e0a5d89db
Reviewed-on: https://chromium-review.googlesource.com/1106159
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#570693}
oscarj
Rename local k<name> constants to be unique
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
when building in Chrome OS for the variables
kErrorInvalidX509Cert in:
chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc
chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc

This commit solves the issue by renaming the variables to
something more file specific. It also renames other variables
in the same namespace, so the naming is locally consistent.

Bug: 850484
Change-Id: I67fc4d43785460ea5aa8fd1a08a2fd1985569117
Reviewed-on: https://chromium-review.googlesource.com/1114963
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#570682}
oscarj
Remove conflicting namespace declarations (jumbo)
In jumbo builds, on chrome os, the namespace redeclarations
of media_perception in:
chrome/browser/extensions/api/media_perception_private/media_perception_api_delegate_chromeos.cc
extensions/browser/api/media_perception_private/media_perception_api_manager.cc
extensions/browser/api/media_perception_private/media_perception_private_api.cc
conflict with the declaration in:
third_party/cros_system_api/dbus/service_constants.h

This commit solves the issue by removing the redeclaration of
media_perception and instead use the full name
extensions::api::media_perception_private.

Bug: 850484
Change-Id: I5a6363ca7e305d1bd7929555f60f9e1bd3322bfc
Reviewed-on: https://chromium-review.googlesource.com/1114852
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#570680}
bratell
Building chromium now requires uuid-dev (uuid/uuid.h)
The latest version of fontconfig requires uuid/uuid.h so
we need to install that in install-build-deps.sh.

(Only tested in Ubuntu 16.04)

Bug: 856666,829890
Change-Id: I586aa703e24a1ea2c10d08948acad37ce177f70f
Reviewed-on: https://chromium-review.googlesource.com/1115129
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570454}
oscarj
Resolve namespace scope issue (chrome/browser/ui)
When building using Jumbo files gets merged.
This results in a conflict with the namespace prefs in
views/media_router/cloud_services_dialog_view.cc.
This commit solves this by specifying that the global
namespace should be used, by adding the "::" prefix.

Bug: 773275
Change-Id: I4803ef96e32ae8a1d9f4c54b3cf95780ecedb6e5
Reviewed-on: https://chromium-review.googlesource.com/1114838
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570439}
oscarj
Move kResizeAreaCornerSize from namespace
When building with Jumbo, kResizeAreaCorner in
views/frame/opaque_browser_frame_view.cc and
views/overlay/overlay_window_views.cc conflict.
This commit solves the issue by moving the
constants from the namespace to the place where
it is used.

Bug: 773275
Change-Id: I87195fe6f650088e7aaa6117ad44e9e919d17cc9
Reviewed-on: https://chromium-review.googlesource.com/1102499
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569978}
oscarj
Rename kAvatarIconSize to be unique (browser/ui)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kAvatarIconSize in
views/profiles/dice_accounts_menu.cc and
webui/signin/user_manager_screen_handler.cc.

This commit solves the issue by renaming the variables to
something more file specific.

Bug: 773275
Change-Id: Ibb0aa4bf8c65fcdc70d5b747cccea336ab77ca9b
Reviewed-on: https://chromium-review.googlesource.com/1107708
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#569977}
oscarj
Rename kNameField to be unique (browser/ui)
When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kNameField in webui/certficates_handler.cc
and webui/inspect_ui.cc.

This commit solves the issue by renaming the variables to
something more file specific. It also renames other variables
in the same namespace, so the naming is locally consistent.

Bug: 773275
Change-Id: I0b900803f4f84c058c43e1b5b3f395c8e14774f9
Reviewed-on: https://chromium-review.googlesource.com/1107929
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569975}
fs
Update/recompute the is-downscaled flag when image loading finishes
If the <img> is layouted before the referenced image finishes loading
(and has dimensions available) and also has specified width and height,
then the |LayoutImage::is_downscaled_image_| will not be set correctly.
Also update said flag in LayoutImage::ImageNotifyFinished.

Bug: 854464
Change-Id: Iee9ad62dff436a0ef4d4a390902309159acb7cb7
Reviewed-on: https://chromium-review.googlesource.com/1107805
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569462}
oscarj
Remove "using" to avoid namespace conflict
When building using Jumbo namespace aliases with the same
name may end up in the same unit, causing a conflict at
compilation. This commit removes "using windows" and
"using tabs" and instead call the namespace by its full
name. This is done to increase the robustness of the code.

std::unique_ptr<T>() are removed because of presubmit check
errors.

Bug: 850484
Change-Id: I91f44728d4b54dd15213bac602176ca8736bb3cd
Reviewed-on: https://chromium-review.googlesource.com/1107633
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#569267}
tmoniuszko
Remove duplicated header file from BUILD.gn
Duplicated header caused Visual Studio error when opening platform.vcxproj
project.

error : Cannot load project with duplicated project items:
../../../../../../../third_party/blink/renderer/platform/graphics/compositor_mutator.h
is included as 'None' and as 'None' item types.

Change-Id: Iee35d7ef24dce3083c291858546fbe5b80428ee9
Reviewed-on: https://chromium-review.googlesource.com/1107921
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#569181}
fs
Remove unused (dead) friend-declaration in ResourceClient
SVGElementProxy no longer exist.

Change-Id: I552e9d3d0d092ba5d0c51c8bacc8b27bdf29fe4c
Reviewed-on: https://chromium-review.googlesource.com/1105977
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#568971}
fs
Simplify the CSSParserSelector destructor
Rather than moving the tag history into a Vector and let that perform
the destruction, just iteratively "collapse" the list until it is empty.

Change-Id: If1f6611caeea9b83da58f94e021647a2db0b7daa
Reviewed-on: https://chromium-review.googlesource.com/1107629
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#568900}
mpichlinski
Added missing eventlog_messages dependency in chrome_watcher.
Bug: 854179
Change-Id: Icee4af543850a30116e811f32a16c38b3498bcf2
Reviewed-on: https://chromium-review.googlesource.com/1106145
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#568832}
mpichlinski
Do not create MediaRouterActionController when Media Router is disabled.
Following change: https://chromium-review.googlesource.com/1026975 disallows
having a control of Chromecast preference in settings, because calling Cast...
after enabling Chromecast preference in runtime without a restart causes a
crash due to missing MediaRouterUIService.

Instead of not creating MediaRouterUIService, do not create
MediaRouterActionController in this service when Media Router is disabled.

Bug: 834719
Change-Id: I218523d631d9050ff27e69915ba098fe21907e25
Reviewed-on: https://chromium-review.googlesource.com/1067817
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568726}
bratell
[jumbo] interface is a Windows API macro so avoid that name
interface is macro for struct in some Windows headers which
causes problems when Windows headers get exposed to code that
has named variables or functions interface. This happened
with the newly added jumbo support in chrome/browser/extensions.

Bug: 850484
Change-Id: I5d838bad5658bfe97542b32647e182348f63c4cc
Reviewed-on: https://chromium-review.googlesource.com/1106339
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#568492}
bratell
Qualify |storage| namespace in some extensions code
There is both ::extensions::api::storage and ::storage so inside
extensions::api, unless you explicitly write ::storage it's unclear
what namespace is intended.

In jumbo builds, some code ended up in a translation unit where
both storage namespaces were known, so this patch adds ::
to storage to make the code explicit.

There is a code style guideline to not use namespace names that are
also top level namespace for this reason, but it's not easy to
change all extension api namespaces.

Bug: 850484
Change-Id: I1c85fbc9dd3dc8be49d41be25f4886ec98c47926
Reviewed-on: https://chromium-review.googlesource.com/1104678
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568116}
fs
Move common AddOutlineRects implementations to LayoutSVGModelObject
All of the (direct) subclasses of LayoutSVGModelObject (LayoutSVGImage,
LayoutSVGShape and LayoutSVGContainer) have the same implementation of
this method, so we can push it up to the common base class.

Change-Id: Ief6d4502917c87505ddab436a3c005597615c49b
Reviewed-on: https://chromium-review.googlesource.com/1104344
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#568072}
bratell
[gn] Doc: Fix toochain typo and clarify the toolchain syntax.
Change-Id: Ica4288a6984f296958b7f9b812edb07663cec22e
Reviewed-on: https://chromium-review.googlesource.com/1104159
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#568046}
fs
Remove unused LayoutObject::AbsoluteElementBoundingBoxRect
Looks like the last caller was removed in
https://codereview.chromium.org/2287433003 .

Change-Id: I2664063bab31fe4983be65cb5c21039a90b73920
Reviewed-on: https://chromium-review.googlesource.com/1104342
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568019}
oscarj
Enable Jumbo for chrome/browser/extension
This commit will enable Jumbo for chrome/browser/extensions.
By enabling and running Jumbo the effort of building is
reduced by 7 times (around 40 CPU minutes on the test computer).

Bug: 850484
Change-Id: Icd42cbbf53dc58d64143c6979ba500d3ec9315c5
Reviewed-on: https://chromium-review.googlesource.com/1101017
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567971}
bratell
Remove aura only files from non-aura content/renderer
Some mostly harmless *_aura* files were included by mistake
in the non-aura build of content/renderer. They turned out to not be
quite so harmless in a jumbo build if combined with the non-aura
version of the same code.

Change-Id: Idfe65638ca16a2e700b485acd67f253073ae5867
Reviewed-on: https://chromium-review.googlesource.com/1102426
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#567961}
oscarj
Rename kDialogWidth constants to make them unique
When building with Jumbo, kDialog in
webui/signin/signin_email_confirmation_dialog.cc and
views/webshare/webshare_target_picker_view.cc conflict.
This commits solves the issue by renaming the constant
to something more file specific.

Bug: 773275
Change-Id: Iea327ab1948297fac97d3e7aaab9cb27a3631a30
Reviewed-on: https://chromium-review.googlesource.com/1102474
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567945}
oscarj
Remove function (chrome/browser/extensions)
The function ProfileForWebContents is defined in both
extension_install_prompt_show_params.cc and
extension_install_prompt.cc. In Jumbo build this causes
a conflict. The function is replaced by a inline statement.

Bug: 850484
Change-Id: I6e8da38fa7c90bc6b53d7c3f770daa3e158d16c2
Reviewed-on: https://chromium-review.googlesource.com/1100462
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567940}
oscarj
Resolve namespace scope issue (chrome/browser/ui)
When building using Jumbo files gets merged.
This results in a conflict with the namespace prefs in
webui/media_router/media_router_webui_message_handler.cc.
This commit solves this by specifying that the global
namespace should be used, by adding the "::" prefix.

Bug: 773275
Change-Id: I504984ef83db8cc23561f1f16ce99cdbee89721e
Reviewed-on: https://chromium-review.googlesource.com/1102419
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567665}
oscarj
Rename enums to avoid conflict (chrome/browser/ui)
The enums ColumnSetType are defined in both
views/passwords/password_pending_view.cc
and views/passwords/password_items_view.cc.
When building using Jumbo both declaration
ends up in the same namespace, causing a
conflict. This commits resolves the issue
by renaming the enums to something more
file specific.

Bug: 773275
Change-Id: I8f48b68df53166e910ab0beaf13ba80af63e40ae
Reviewed-on: https://chromium-review.googlesource.com/1102432
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567661}
fs
Change handling of negative exponents in GenericParseNumber
Rather than enforcing a limit on the smallest exponent, pass all
negative exponents straight to pow(...) and let it deal with it. Per
IEEE754 pow(10, -Inf) should yield 0, and the cast should round properly
for larger negative exponents (smaller than -37.)

Bug: 852785
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iccd80f7e80c8b87c49cd5eedf5e49ad1e9ccc8dc
Reviewed-on: https://chromium-review.googlesource.com/1102329
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567660}
oscarj
Resolve member conflict in enums
In Jumbo build, the member NONE in the enum
VerifyStatus in install_verifier.cc conflicts
with the same member in the enum
Transformation inactivity_log/activity_log.cc.
This commit solves the issues by defining
VerifyStatus as a strongly typed enum.

Bug: 850484
Change-Id: Idc3cab01b96073b20adf6fcd87e01cdf9b02a739
Reviewed-on: https://chromium-review.googlesource.com/1098664
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567168}
oscarj
Remove using-declaration to resolve conflict
When building using Jumbo, the using-declaration
of api::webrtc_logging_private::RequestInfo
results in a conflict, since a declaration of
RequestInfo exists in both api/webrtc_logging_private.h
and api/webrtc_audio_private.h. This commit solves the
conflict by removing the using-declaration.

Bug: 850484
Change-Id: I9bc25994cccdfd2e9ae19ecdacde06ed7780b1b2
Reviewed-on: https://chromium-review.googlesource.com/1098658
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567167}
oscarj
Rename g_shown in bubble delegates for Jumbo build
The function g_shown is defined in every bubble delegate.
When building using Jumbo those functions conflict with
each other. This commit fixes this by renaming the functions
to something more file specific.

Bug: 850484
Change-Id: I9df3a8e90ed77e95649cdb734cc4d7364b5fc310
Reviewed-on: https://chromium-review.googlesource.com/1096945
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567166}
oscarj
Resolve function and variable conflict
When using Jumbo build, there are conflicts between
dashboard_private_api.cc and webstore_private_api.cc.
The conflicts are the variable kUserCancelledError
and the function WebstoreInstallHelperResultToApiResult.
This commit solve the issues by renaming the variable and
function to something more file specific.

Bug: 850484
Change-Id: I600a036505ef731124ac6e4c3ea2f750a50ccad5
Reviewed-on: https://chromium-review.googlesource.com/1098958
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567165}
oscarj
Remove namespace alias (chrome/browser/extensions)
When using Jumbo build, the namespace alias Create in
/api/context_menus/context_menus_api.cc conflicts
with the function Create called from
api/desktop_capture/desktop_capture_base.cc.
This commits solves the issue by removing the namespace
alias. It also removes the namespace aliases
Update and Remove in the same file to avoid
this issue in the future.

Bug: 850484
Change-Id: Ibdb940e153a89b7120c670e806be34fc4e95ab90
Reviewed-on: https://chromium-review.googlesource.com/1099062
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567164}
bratell
Rename some kBackgroundColor constants to make them unique
In jumbo experiments in chrome/browser/ui, one of the problems
is that there are many kBackgroundColor variables in anonymous
namespaces that become the same anonymous namespaces in jumbo.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I8746a88a32f64a0645fd88e850e39d22bc635e19
Reviewed-on: https://chromium-review.googlesource.com/1078814
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567021}
bratell
Rename some kButtonPadding constants to make them unique
In jumbo all files are merged into a single (or many) larger
translation unit and then a couple of kButtonPadding variables
end up in same anonymous namespace so that they clash.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I9d8be1076552b7ffaa095bb4d50d3fa3d5845274
Reviewed-on: https://chromium-review.googlesource.com/1078816
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566957}
bratell
Rename some kBorderThickness constants to make them unique
In jumbo all files are merged into a single (or many) larger
translation units and then a couple of kBorderThickness variables
end up in same anonymous namespace so that they clash.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I1d81153af042c27927902b648fd7271a13f47c92
Reviewed-on: https://chromium-review.googlesource.com/1079168
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566956}
tmoniuszko
Force en_US locale in SyncCycleSnapshotToValue test
Bug: 852349
Change-Id: I8367c10390caf2f5eda219eadb958e10e049c4cc
Reviewed-on: https://chromium-review.googlesource.com/1098933
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Tim Schumann <tschumann@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566826}
bratell
Move two identical SecondsToTimeTicks to tighter scopes
Two blink tests used their own SecondsToTimeTicks helpers which
clashed in jumbo builds where those files were compiled in the
same translation unit. Since it's a small function and hard to
find a suitable shared place, this moves the functions to
tighter scopes to not interfere with each other.

Change-Id: I9e04eed676e9e07f4aa5a815b655625bba03593f
Reviewed-on: https://chromium-review.googlesource.com/1095336
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566824}
oscarj
Rename constants with the same name
When building with Jumbo, unnamed namespaces gets merged.
Constants with the same name within those namespaces conflict.
This commit renames those constant to something more file
specific.

Bug: 850484
Change-Id: If04a32cbf9ce544d852b1297f229d24d96845c59
Reviewed-on: https://chromium-review.googlesource.com/1096757
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566596}
fs
Don't corrupt list-based hit-test results in LayoutSVGForeignObject
Assigning the HitTestResult used for the PaintLayer will corrupt (reset)
any result acquired previously. So results from the foreground phase
would be erased by any later phase(s). Use HitTestResult::Append
instead if we're performing a list-based hit-test.

Bug: 849617
Change-Id: I5f53cad7e8396377815af51bd52db924b3fe6d5a
Reviewed-on: https://chromium-review.googlesource.com/1095182
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566382}
bratell
Cut down the number of kIconSize variables
In jumbo build experiments, one obstacle for using jumbo for
chrome/ui is that there are too many kIconSize is the global
anonymous namespace. This patch renames them according to their
use, but other options are available (and are used) such as
moving the constants into the functions where they are used or
into a less global namespace.

Bug: 773275
Change-Id: I62db42da677cffc53087aede879deaf5245b3640
Reviewed-on: https://chromium-review.googlesource.com/1076237
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566377}
oscarj
Remove using declarations in browser/extensions
In Jumbo builds the declaration "using base::Time" (also
"using base::TimeDelta") conflicts with a typedef in X11 system header.
This commit will remove the declarations and use the namespace
prefix instead.

The function CalculatePingDays in
extension_updater.cc has been renamed since a function with
the same name exists in chrome_update_client_config.cc.

Bug: 850484
Change-Id: I67a2e6f8710f5c730344b8d47be742c72f1667c6
Reviewed-on: https://chromium-review.googlesource.com/1092693
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#566348}
oscarj
Resolve namespace conflicts in Jumbo build
When using Jumbo build, local namespaces conflict with global
namespaces. The local redefinition of namespaces, for example
"namespace bookmarks = api::bookmarks" also causes conflicts
between files. This commit removes the local
redefinitions and adds the "::" prefix when necessary.

Bug: 850484
Change-Id: Idd8b281a0e4999c27baffe326b5de33ba2247692
Reviewed-on: https://chromium-review.googlesource.com/1094636
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#566338}
fs
Remove "dead" code in BackgroundImageGeometry
BackgroundImageGeometry::SetSpaceX/SetSpaceY computes
|computed_{x,y}_position| from Length() - which is 'auto' and thus
always resolve to 0. Remove the computation, replacing it with '0' and
simplify.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3e0648da78d9a0ff6e644cb4440f188ee8f52e53
Reviewed-on: https://chromium-review.googlesource.com/1095258
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#566044}
oscarj
Resolve conflict for namespace "errors"
In Jumbo build, the local redefinition of the namespace
errors, for example "namespace errors = manifest_errors",
causes conflicts between files. This is resolved by removing the local
redefinition and using the full name instead.

Bug: 850484
Change-Id: I5b8aecd3dc5b7c922bef515b82f11c5bfdf19515
Reviewed-on: https://chromium-review.googlesource.com/1095075
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#565999}
oscarj
Remove conflicting namespace declarations
In Jumbo builds the namespace declarations such as "keys", "helpers" and
others conflict. The are named the same in multiple files since they
have the same purpose, but with Jumbo this is no longer appropriate.
The declarations that conflict are removed.

Bug: 850484
Change-Id: I62246ebe303f1cdcabb2c21312eef4c6d4a7d92a
Reviewed-on: https://chromium-review.googlesource.com/1090916
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#565937}
bratell
Rename the two CreateMemoryCoordinatorHandle functions in content
There were two small (identical) helper functions in
content/browser named CreateMemoryCoordinatorHandle(..). One in
gpu and one in render_host, and with no obvious place
to put a shared copy.

These two cause problems in some extreme jumbo configurations so
this patch renames them according to how they are user.

Change-Id: I508530b6290606a01046ec0378d8da7d9f8c164b
Reviewed-on: https://chromium-review.googlesource.com/1092696
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565646}
bratell
Move duplicate CappedSizeInKB() to header file for sharing
Some jumbo builds broke because of too many CappedSizeInKB so moving
it to heap.h to unbreak the builds. It's a small inlined method.
The moved function is not using std::min to avoid including
<algorithm> in heap.h and potentially causing a measurable
build time regression.

TBR=mlippautz@chromium.org,haraken@chromium.org

Bug: 840789
Change-Id: I4e4bf3989235c6e7274a56f5c10823d8bb37a4df
Reviewed-on: https://chromium-review.googlesource.com/1090839
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#565289}
fs
Fold marker methods in LayoutSVGPath
Fold all of ProcessMarkerPositions, ShouldGenerateMarkerPositions,
MarkerRect and CalculateUpdatedStrokeBoundingBox into a larger, but
still manageable, single function (UpdateMarkers). Shorter term this
makes for less (and slightly more efficient) code. Longer term this
should make future changes to resource handling easier.

Also take this opportunity to make some minor cleanups (use a range-
based for loop; replace a ternary expression with an equivalent.)

Bug: 769774
Change-Id: I029fcdfa388c786fa30ebe861ba78d15d3a3d792
Reviewed-on: https://chromium-review.googlesource.com/1086943
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#564593}
auygun
Android: Move ContentViewRenderView to the embedder support component
Bug: 840360, 617324
Change-Id: I66a3a35d5fb8df66ee003ae1be48cbb89ba848d2
Reviewed-on: https://chromium-review.googlesource.com/1070159
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Attila Uygun <auygun@opera.com>
Cr-Commit-Position: refs/heads/master@{#564425}
oscarj
Avoid ambiguity between blink::Path and blink::XPath::Path
If XPath headers and graphics headers end up in the same translation
unit a collision will occur for the symbol Path. This commit will fix
the collision by adding blink:: prefix. According to a post in
chromium-dev this can happen in Jumbo builds.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I30ad0be4ea2000779313024d57531c1200bb2603
Reviewed-on: https://chromium-review.googlesource.com/1085055
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564111}
bratell
Disable all of the include guard presubmit check for third_party
The style check for include guards in third_party had already been
disabled but there are also headers in third_party with no
normal include guards at all so we better disable all of the check.

(blink is not considered third_party).

Bug: 845584
Change-Id: I801022a18daec38e9e6788c313e6bac6ed8a150b
Reviewed-on: https://chromium-review.googlesource.com/1080511
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#564045}
fs
svg/animations/viewspec-checkaspectparams.html no longer failing
TBR=schenney@chromium.org

Bug: 843192
Change-Id: I71f2dec1606aec96200731eeb9d3785347507216
Reviewed-on: https://chromium-review.googlesource.com/1080512
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#563189}
bratell
[jumbo] Make sure all AtomicString maps use the same hash
text_break_iterator_icu.cc didn't use the AtomicString hash
function and when the compiler noticed that inconsistancy in
a jumbo build, that jumbo build broke with the error:

../../third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h:51:8:
error: explicit specialization of 'WTF::HashTraits<WTF::AtomicString>' after instantiation

This was triggered by an unrelated change that happened to reorder
some code.

TBR=drott@chromium.org

Change-Id: I4773df7ce31e676b39dac9a8e2c4e2602d3746ce
Reviewed-on: https://chromium-review.googlesource.com/1079569
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#563183}
bratell
Typo fixes: Include h files instead of cc files in chromeos
So:
Include chromeos_switches.h instead of chromeos_switches.cc
Include base_event_utils.h instead of base_event_utils.cc

Typo made a test include a cc file instead of the more commonly
included header file. This patch changes to include the header file.

There are no known bad side effects of this, but it was found
when looking for similar instances of a piece of code that did
cause problems.


Change-Id: I33105752517ba4e423dcae7c1ea0186fc7613127
Reviewed-on: https://chromium-review.googlesource.com/1005065
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#563154}
bratell
Typo fix: Include a .h file instead of a .cc file in a test
A test includes the cc file
components/search_engines/search_engines_test_util.cc instead of
its header file. This patch changes that to include the header
file instead.

This inclusion has caused no to me known problems and was just found
as a result of looking through the source for this pattern after
a similar instance did cause problems.

Change-Id: Iffdb68a8055d69a8a3df450c7982ec1e674dcf6e
Reviewed-on: https://chromium-review.googlesource.com/1005175
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563075}
bratell
Add dependency gpu:test_support -> ui/gfx:test_support
In some jumbo build configurations the linker needs
gfx::PrintTo(gfx::Size const&, ...) referenced from
obj/gpu/libtest_support.a
testing::internal::UniversalPrinter<gfx::Size>::Print(
    gfx::Size const&, ...)

This reference might be in dead code that would otherwise (in
non-jumbo builds) have been stripped earlier, but since the
reference apparently is there it's best to have
the dependency as well.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I6fe98a5427e5bc30625773bfa73d5b248b34f30a
Reviewed-on: https://chromium-review.googlesource.com/1005340
Reviewed-by: Victor Miura <vmiura@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#562997}
fs
Rework SVGViewSpec to be an immutable object
This reworks SVGViewSpec to be an immutable object created from either a
fragment string or a <view> element (indirectly via the fragment
identifier.) "Inheritance" of the value is then handled by checking if
there's a SVGViewSpec set (like before) and whether it has a value set
(for 'viewBox', 'preserveAspectRatio' et.c), and if it doesn't just use
the value from the SVGSVGElement.
This allows any animations of the SVGSVGElement to properly take effect
while still allowing overrides from an SVGViewSpec.
While this should arguably also be the case for SVGViewElements
referenced by a fragment identifier, these are left as before (not
responding to animations.)

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic36e754ef211182391e041cb3c6f9443535c3acc
Reviewed-on: https://chromium-review.googlesource.com/1078647
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562853}
fs
<view> elements should apply to the root element
Like the comment here indicates, it wasn't clear which <svg> a <view>
element should apply to. This was clarified in SVG2 [1] to be the "root
'svg' element", which is the same as for a "svgView(...)" fragment.
The comment is updated to reflect the new spec text.
The new behavior matches Gecko.

[1] https://svgwg.org/svg2-draft/linking.html#SVGFragmentIdentifiersDefinitions

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If76e2ca1c954af75203905ca6e50eef60ccf9ec4
Reviewed-on: https://chromium-review.googlesource.com/1075207
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562471}
fs
Remove inheritance of SVGZoomAndPan into SVGViewSpec
Since we no longer expose SVGViewSpec as a DOM interface, we don't need
to have it inherit SVGZoomAndPan. This allows simplifying the code a bit
and will eventually allow making SVGViewSpec immutable (in a cleaner
way.)

To allow this, the parsing of the SVGZoomAndPan value is rework such
that one can go from String to SVGZoomAndPanType without the inheritance
i.e by not operating on the internal value, but rather return one.

Also make some minor cleanups such as uninlining
SVGZoomAndPan::ParseAttribute.

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4dedcb6a76f3dabf3f7c441d03bee2dfae8efb2d
Reviewed-on: https://chromium-review.googlesource.com/1075128
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562440}
fs
Clamp argument to SVGGeometryElement.getPointAtLength to [0, length]
Per:

  https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__getPointAtLength

Bug: 847198
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9067ce9f196453bd54560d5119ebc38d35c8ac86
Reviewed-on: https://chromium-review.googlesource.com/1075332
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562422}
fs
Remove stray argument to GetRoundedBorderFor in ShapeOutsideInfo
Once upon a time, GetRoundedBorderFor(...) did accept a LayoutView*
argument, but it no longer does. Luckily this would've yielded true
anyway - matching the default argument - so no functional change is to
be expected.

Change-Id: Ief012e7a37efc9e9293f10bc2c67172ab088200d
Reviewed-on: https://chromium-review.googlesource.com/1076231
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562398}
bratell
Use the same libjpeg in all of blink/platform
The normal libjpeg renames some symbols with macros so if its
headers are included together with libjpeg-turbo's headers
in the same translation unit, there will be an inconsistent
renaming of libjpeg symbols. This happened in some extreme
jumbo configuration and resulted in confising linker errors.

This patch changes an include so that jpeglib.h becomes included
the same way everywhere.

Change-Id: I7f122d0919d58371bb40dc0097a766b857b9815e
Reviewed-on: https://chromium-review.googlesource.com/1073423
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#562243}
fs
Move intrinsic_sizing_info.h to core/layout
It's a layout-related gizmo. Take this opportunity to forward-declare
IntrinsicSizingInfo and only include where used.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I39750738147dbfce05ac1e77042fecfc02b2a92d
Reviewed-on: https://chromium-review.googlesource.com/1070374
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561895}
fs
Fix errors in wpt/css/css-masking/* tests
clip-path-svg-content/clip-path-clip-rule-008.svg:
  Add missing reference (reference/clip-path-clip-rule-004-ref.svg).

clip-path-svg-content/clip-path-css-transform-002.svg:
  Adjust translation to match reference.

clip-path-svg-content/clip-path-dom-href.svg:
  Do setAttribute(...) on the correct <g>.

clip-path/clip-path-element-userSpaceOnUse-002.html:
  Shrink the clip-path so that it clips out the border, to match the
  reference.

clip-path/clip-path-ellipse-002.html:
clip-path/clip-path-ellipse-003.html:
clip-path/clip-path-ellipse-004.html:
clip-path/clip-path-ellipse-005.html:
  Adjust the description text so that it matches the reference.

clip-path/clip-path-ellipse-006.html:
  Use a different reference (reference/clip-path-ellipse-ref.html), and
  adjust the target <div> such that it matches the reference (replacing
  the red border with a margin.)

clip-path/clip-path-ellipse-007.html:
clip-path/clip-path-ellipse-008.html:
  Replace red border with a margin.

clip-path/clip-path-polygon-001.html:
clip-path/clip-path-polygon-002.html:
clip-path/clip-path-polygon-003.html:
  Adjust the description text so that it matches the reference.

clip-path/clip-path-polygon-004.html:
  Fix typo in assertion.

clip-path/clip-path-polygon-005.html:
  Adjust the description text so that it matches the reference.

Bug: 626703, 843084
Change-Id: I09c37cbe80ca3b82478bdd994ae027e9a72f280c
Reviewed-on: https://chromium-review.googlesource.com/1071529
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561880}
bratell
Change some payments code to not have so many kFirstTagValue
In jumbo build experiments all the kFirstTag variables ended up
in the same translation unit and prevented compilation. This patch
retires those variables, and also renames an enum that had got
a copy-paste name.

Bug: 803406
Change-Id: I887d85a3632766845a7caede089d99ed73efba35
Reviewed-on: https://chromium-review.googlesource.com/1073308
Commit-Queue: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561861}
fs
Fix wpt/css/css-masking/parsing/clip-valid.html subtest
Percentages are not allowed in rect() (arguments are '<length> | auto'.)
Move the old test to clip-invalid.html and replace it with one that
doesn't use percentages.

Bug: 843084
Change-Id: I3cadd99da0d302ac5a0cd012450dd7ade233681c
Reviewed-on: https://chromium-review.googlesource.com/1071469
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561598}
fs
Remove stray, unneeded (and incorrect) forward declaration
WebContentsObserver is in the 'content' namespace, not in the global.
This causes a collision with a 'using' directive for the same class,
which breaks Jumbo builds.

TBR=avi@chromium.org,siggi@chromium.org

Bug: 755840, 846328
Change-Id: I977106611b374c955bf3c5c161c8a52eea927698
Reviewed-on: https://chromium-review.googlesource.com/1071663
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561512}
bratell
[jumbo] Fixing collision between wtf ntohs and Windows ntohs
A recent change in blink added a dependency on services/network which
indirectly use winsock2.h for htons a ntohs. Since blink uses its custom
ntohs and htons for Windows, those clash. This changes so that blink also
uses winsock2.h for htons, ntohs.

Bug: 839982
Change-Id: I5bebce4e62227512da2c922dc41a564ce442f388
Reviewed-on: https://chromium-review.googlesource.com/1070973
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#561469}
fs
Allow Text node in elementsFromPoint if descendant of SVG text content
When hit-testing, SVG text content nodes will use their Text node
descendants as the inner-most/hit node, and hit-testing will not be
performed in any of the background phases. Thus we need to selectively
allow Text node which has an SVG text content element as their parent.

Bug: 842504
Change-Id: Ie282d5e9a66880f3f0d5e319b249f5f41db9e9db
Reviewed-on: https://chromium-review.googlesource.com/1059753
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561238}
fs
Reverse traversal order in SVGRootInlineBox
Text painted later should make the top-most node, so line boxes should
be visited front-to-back. This will generally only make a difference for
text nodes that overlap.

This will also make a difference when elementsFromPoint is fixed, since
then we'll add the hit elements in the required "innermost to outermost"
order.

Bug: 842504
Change-Id: I541a394cbb0677980308615793f5e1fa9ea3b401
Reviewed-on: https://chromium-review.googlesource.com/1070196
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561222}
bratell
[jumbo] Rename one of the EnumerateOutputDevices functions
Since we just got two EnumerateOutputDevices functions in
content/browser/renderer_host/media, in a jumbo build the compiler
doesn't know which to use in a Bind call. This renames one of them
OldEnumerateOutputDevices since the code was renamed that way.

TBR=guidou@chromium.org,ossu@chromium.org

Bug: 837661
Change-Id: I1cb5201e05400f726e5081baa10a87fe2dce5cc5
Reviewed-on: https://chromium-review.googlesource.com/1069357
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#561208}
fs
Document SVGImage::{Get,Has}IntrinsicSizingInfo
TBR=schenney@chromium.org

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icd23f26d15c522033d84c832d6655277533c0e37
Reviewed-on: https://chromium-review.googlesource.com/1070278
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561130}
fs
Use consistently computed lengths when finding relevant contour
In CalculatePointAndNormalOnPath, compute the accumulated length of the
contours and compare against the passed in (now unmodified) |length|, to
increase the chances of comparing similarly computed length with each
other. |length| is often, directly or indirectly, derived from the
computed length of the Path (i.e using Path::length().)

Bug: 845375
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibda61dd29921f41e0b294edde31ddb21ebbefd08
Reviewed-on: https://chromium-review.googlesource.com/1069071
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561032}
mpichlinski
Wait for completion of changing enabled tracks in PipelineIntegrationTests.
Calling Seek/Resume on Pipeline when OnEnabledAudioTracksChanged or
OnSelectedVideoTrackChanged have not finished their job will end with a crash:
- PlaybackWithVideoTrackDisabledThenEnabled crashes on
  DCHECK(!(pending_audio_track_change_ || pending_video_track_change_));
  in RendererImpl::Flush when calling Seek after unfinished
  OnSelectedVideoTrackChanged,
- TrackStatusChangesWhileSuspended crashes on
  return time_source_->CurrentMediaTime();
  in RendererImpl::GetMediaTime() due to nullptr time_source_
  when OnEnabledAudioTracksChanged finishes its job after calling Resume.

In production code PipelineController is responsible for gating operations
via callbacks in order to prevent race conditions.

Sometimes RunUntilIdle may be insufficient for changing track state, instead
of it wait in the RunLoop until completion callback has been called.

Bug: 836785
Change-Id: I8a784d668b6d92bebd90fafd6e6dbddb18c9ceb4
Reviewed-on: https://chromium-review.googlesource.com/1066015
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560640}
fs
Fix SVGImage filtering in JankTracker
The condition claiming to filter out documents (frames) originating from
SVGImages was in fact filtering out all SVG documents. Adjust.

Move the unit test to SVGImageTest because it already has usable
infrastructure to test this properly.

Also add DISALLOW_NEW to the JankTracker definition to indicate its
relation to the GC.

Bug: 581518
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I53ae6100c1538430c97c8b0fd6cda2f5c1ee9a6c
Reviewed-on: https://chromium-review.googlesource.com/1068914
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560630}
fs
Allow more selective invalidations for 'filter'
Add a new InvalidationMode flag (kSkipAncestorInvalidation) to allow skipping
the invalidation of ancestors, and then use that for the "fine-grained"
invalidation in LayoutSVGResourceFilter to restore the more efficient method
for clients which have a usable FilterData.

For filters referenced by SVG content, this restores the behavior (by not
invalidating more than needed, avoiding caches being dropped.) For non-SVG
content the behavior remains the same (flags are not used/ignored.)

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I41ccbbb6552558297329050dbe7630a2d624273a
Reviewed-on: https://chromium-review.googlesource.com/1065910
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#560529}
bratell
[jumbo] Declare BubbleDialogDelegateView template specialization
BubbleDialogDelegateView has a specialization of view properties
so declare it to be sure the compiler doesn't get upset about
using properties before it knows about the specialization.

Bug: 764918
Change-Id: I55b70dc3dacfdcd5eb466cfcde234090573d2bfa
Reviewed-on: https://chromium-review.googlesource.com/1067346
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#560502}
fs
Apply zoom in LayoutSVGRoot::ComputeIntrinsicSizingInfo
Previously we didn't know in what context said method was called, so we
didn't know if zoom ought to be applied or not.
Add LayoutSVGRoot::UnscaledIntrinsicSizingInfo and change current
callers of ComputeIntrinsicSizingInfo to use it. Then make
ComputeIntrinsicSizingInfo scale the intrinsic size.

Bug: 722055
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If668e85bcea1028e48a3bc98c74d07435d425338
Reviewed-on: https://chromium-review.googlesource.com/1067397
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560331}
fs
Get rid of SVGImage::EmbeddedReplacedContent
Rather than exposing the document root's LayoutObject, add an bunch of
methods to achieve the same thing as the returned object is used for.
Reuse the same names as used on FrameView. Also rename the method on
LayoutImage to something more appropriate.

Bug: 722055
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6d006206365988c2ad8068db7251414529ed3bca
Reviewed-on: https://chromium-review.googlesource.com/1065997
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560322}
fs
Rebuild the SVGResources for <pattern> after changing SVGResource
Since we reassociate the SVGResource synchronously, we need to also make
sure that the associated SVGResources object is updated, else it could
end up pointing to the old <pattern> LayoutObject.

Bug: 845040
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I026b46abcd510485ddfe33622cb5f5aa1bab9610
Reviewed-on: https://chromium-review.googlesource.com/1065779
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#560300}
fs
Reland: "[CI] Convert SVG resources to use SVGResource"
From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
the string representation of SVGResources ('filter' and 'clip-path'),
convert to using SVGResources.
Add an implementation of SVGResourceClient (SVGElementResourceClient)
and register it with the existing resources. Invalidation code is moved
here. This makes the invalidation code slightly more homogeneous between
the various code-paths.

The new SVGResourceClient implementation is stored in SVGElementRareData
as needed.
The various computed style representations are converted to use the new
StyleSVGResource, which is a ref-counted wrapper around an SVGResource
and its underlying string representation (which is needed for
serialization.) Style building is changed to produce this new wrapper
(rather than an AtomicString.) A helper for serialization is added to
ComputedStyleUtils.
The kHasPendingResources flag is removed since it no longer used, and
the hook in Element is removed.
All LayoutSVGResource* subclasses are changed to take SVGResourceClients
instead of LayoutObjects, and the |clients_| set is removed in favor of
the set in SVGResource.
A bunch of helpers are added for updating (adding/removing) the client
registrations. The various LayoutSVG subclasses are updated to call
these helpers.

Changes on reland: LocalSVGResources are now tracked using WeakMember, and
the associated IdTargetObservers are cleaned up when weak references are
cleared.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie0b42471aea5ea5afb5d239662b4ba195281f764
Reviewed-on: https://chromium-review.googlesource.com/1057330
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559479}
bratell
Don't check header guard style in third_party
The presubmit check warning for correct include guards would
trigger for generated files in third_party/win_build_output. Since
files in third_party is often not written with the Chromium style
guide in mind that is over zealous so this patch stops
checking their names (except for in blink).

The presubmit code will still check the existence of a guard since
lack of one can cause problems outside the module and there has been
no reports of false warnings.

This patch also removes the exceptions that used to be there for
blink since blink has moved and been reformatted.

Bug: 814776
Change-Id: Ic7f2bbba5b9bcafbb5bec15b79b04d5e81994b77
Reviewed-on: https://chromium-review.googlesource.com/1061698
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#559185}
fs
Refactor computation of intrinsic size for "nested" objects
Sink the update of intrinsic_size_ out of the if-else in
ComputeIntrinsicSizingInfoForReplacedContent, and then push
GetNestedIntrinsicSizingInfo down into subclasses, folding it away to use the
"local" constructs of the relevant subclasses.

This leaves subclasses to deal with issues such as if whether to apply zoom
or not et.c, and will with some additional tweaks allow for more succinct
interfaces in the "nested" cases. It also makes LayoutReplaced much simpler.

Bug: 722055
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie8493ffa89ffb34d2591d6a7ecdc8ebc20c6264f
Reviewed-on: https://chromium-review.googlesource.com/1059776
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#559069}
bratell
Avoid ambiguity between ::i18n and ::autofill::i18n.
Unfortunately there are two i18n namespaces, including one
global one, so if you are in ::autofill, referring to i18n is
ambigious if the compiler knows about both of them. This happens
in jumbo builds which means that my previous jumbo fix here didn't
actually work.

Change-Id: I7467ff958e93433581da0134d9a6e8ddd21bde49
Reviewed-on: https://chromium-review.googlesource.com/1057728
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#558364}
bratell
[jumbo] Make PhoneNumber unambigious
There is a ::i18n::phonenumbers::PhoneNumber and a
::autofill::PhoneNumber. To avoid ambiguity (especially in jumbo
builds where more types are known to more code), refer to
::i18n::phonenumbers::PhoneNumber with the full name inside
autofill code.

Also refer to PhoneNumberUtils from the same namespace the same
way for consistency.

Change-Id: Ic36cae9a8df0ceb07f3494fa34d8b08531cd46e4
Reviewed-on: https://chromium-review.googlesource.com/1050288
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557164}
fs
Revert "[CI] Convert SVG resources to use SVGResource"
This reverts commit 3431b89c8be2d7b1a60f5eb135b1d27ce432ce9b.

Reason for revert: Tickled fuzzers

Original change's description:
> [CI] Convert SVG resources to use SVGResource
> 
> From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
> the string representation of SVGResources ('filter' and 'clip-path'),
> convert to using SVGResources.
> Add an implementation of SVGResourceClient (SVGElementResourceClient)
> and register it with the existing resources. Invalidation code is moved
> here. This makes the invalidation code slightly more homogeneous between
> the various code-paths.
> 
> The new SVGResourceClient implementation is stored in SVGElementRareData
> as needed.
> The various computed style representations are converted to use the new
> StyleSVGResource, which is a ref-counted wrapper around an SVGResource
> and its underlying string representation (which is needed for
> serialization.) Style building is changed to produce this new wrapper
> (rather than an AtomicString.) A helper for serialization is added to
> ComputedStyleUtils.
> The kHasPendingResources flag is removed since it no longer used, and
> the hook in Element is removed.
> All LayoutSVGResource* subclasses are changed to take SVGResourceClients
> instead of LayoutObjects, and the |clients_| set is removed in favor of
> the set in SVGResource.
> A bunch of helpers are added for updating (adding/removing) the client
> registrations. The various LayoutSVG subclasses are updated to call
> these helpers.
> 
> TBR=junov@chromium.org
> 
> Bug: 769774
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I62418465251532240c4e895e5c4d253ed9e53b9a
> Reviewed-on: https://chromium-review.googlesource.com/977965
> Commit-Queue: Fredrik Söderquist <fs@opera.com>
> Reviewed-by: Fredrik Söderquist <fs@opera.com>
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Reviewed-by: Stephen Chenney <schenney@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#556743}

TBR=pdr@chromium.org,fs@opera.com,junov@chromium.org,schenney@chromium.org

Change-Id: I695b3eed793bb000b057bca52364265d201f0bae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/1051345
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#557120}
fs
Fix [a-z] range comparison in IsValidElementNamePerHTMLParser
Bug: 648179
Change-Id: I623023d6e195447381bf8b08124d7475bb0fe93d
Reviewed-on: https://chromium-review.googlesource.com/1049629
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#557117}
fs
[CI] Convert SVG resources to use SVGResource
From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
the string representation of SVGResources ('filter' and 'clip-path'),
convert to using SVGResources.
Add an implementation of SVGResourceClient (SVGElementResourceClient)
and register it with the existing resources. Invalidation code is moved
here. This makes the invalidation code slightly more homogeneous between
the various code-paths.

The new SVGResourceClient implementation is stored in SVGElementRareData
as needed.
The various computed style representations are converted to use the new
StyleSVGResource, which is a ref-counted wrapper around an SVGResource
and its underlying string representation (which is needed for
serialization.) Style building is changed to produce this new wrapper
(rather than an AtomicString.) A helper for serialization is added to
ComputedStyleUtils.
The kHasPendingResources flag is removed since it no longer used, and
the hook in Element is removed.
All LayoutSVGResource* subclasses are changed to take SVGResourceClients
instead of LayoutObjects, and the |clients_| set is removed in favor of
the set in SVGResource.
A bunch of helpers are added for updating (adding/removing) the client
registrations. The various LayoutSVG subclasses are updated to call
these helpers.

TBR=junov@chromium.org

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I62418465251532240c4e895e5c4d253ed9e53b9a
Reviewed-on: https://chromium-review.googlesource.com/977965
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556743}
fs
Fix drop-shadow(...) offset int conversion in FilterEffectBuilder
Avoid the implicit conversion to int in the constructor for WebPoint.
Also don't pass through WebPoint at all since AppendDropShadowFilter
take an IntPoint.

Bug: 836480
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2c05681c686cf9f7169c79cf5f67849f483f36f8
Reviewed-on: https://chromium-review.googlesource.com/1039829
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#555499}
fs
Remove (trivially) unneeded ImageResourceContent::IntrinsicSize calls
Since SVGImage is handled explicitly already, and we pass
kDoNotRespectImageOrientation to IntrinsicSize() in these functions,
just call Image::Size() directly rather than passing through the
ImageResourceContent method.

Bug: 773272
Change-Id: I6b7c24f5be425f04cd2f68cbc4612054b635bc2b
Reviewed-on: https://chromium-review.googlesource.com/1032745
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#554763}
fs
Factor out <clipPath> user space transform computation
This computation (clipPath[transform] and optional oBB transform) is
used by LayoutSVGResourceClipper::HitTestClipContent,
LayoutSVGResourceClipper::ResourceBoundingBox and ClipPathClipper.

Factor it into a new method CalculateClipTransform() on
LayoutSVGResourceClipper and use it at the three locations.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icaa9707f24c11f1a45d80ff71d8e156c868898c1
Reviewed-on: https://chromium-review.googlesource.com/1030212
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#554022}
mpichlinski
Fixed compositor_unittests that crashed on Mac
After recent changes TestCompositorHostMac started requiring
a real AcceleratedWidgetMac, otherwise it would crash while
trying to Show. After fixing that, there was another issue
that ImageTransportSurface started crashing, because of
skipped SetAllowOSMesaForTesting in compositor test_suite.

Tests affected:
LayerWithRealCompositorTest.*

Change-Id: I60b84611406744989e2f00f13e20c1177912814f
Reviewed-on: https://chromium-review.googlesource.com/1014101
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#553960}
fs
Fix style on some parameter names in the CSS parser
  unitlessZeroFeature -> unitless_zero_feature
  negativeSize -> negative_size
  threeValuePosition -> three_value_position

Change-Id: Id42906e518e6780bfa601031d8ad00430b2f48b4
Reviewed-on: https://chromium-review.googlesource.com/1027878
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553777}
fs
Use round() [not roundf()] in RoundedIntPoint(const DoublePoint&)
This avoids the implicit conversion to float, which can lead to loss of
precision.

Bug: 836722
Change-Id: I66ea0f42823347b17e41e5d823aaf766429eacbf
Reviewed-on: https://chromium-review.googlesource.com/1027710
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#553543}
mharanczyk
Prevent ManifestHandlerRegistry override from leaking to different tests.
ContentVerifierTest was setting up override but never reseting it
causing other tests that loaded extension to access invalid memory
of stack allocated registry override.

This is regression after crrev.com/c/957645 that causes crash
or timeout in extensions_unittests.

Bug: 809088, 832801
Change-Id: I45d8ee2e4e450e8d5f619e502e7a6e96c8879ef0
Reviewed-on: https://chromium-review.googlesource.com/1013982
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551738}
ppluciennik
Fixed problem with absolute paths in ninja files.
R=brettw@chromium.org, rsesek@chromium.org, sdefresne@chromium.org, sergeyu@chromium.org

Bug: 821738
Change-Id: Ib1dcca4070ad7019c082653217df48adda69ab32
Reviewed-on: https://chromium-review.googlesource.com/962282
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551519}
wdzierzanowski
Avoid calling GetAllStreams() on uninitialized Demuxer
The first time we know the Demuxer initialization is complete is when
Pipeline::Start() completes (asynchronously).

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I7451187be2d141780d5aa514fb3a1ec4abe8fbbe
Reviewed-on: https://chromium-review.googlesource.com/1000858
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551156}
bratell
Avoid redefining IsMsgHandled by making all Win message handlers safe
There were two sets of message map macros, one with IsMsgHandled as a
function, one with it as a macro. If combined in some translation unit
that could cause compilation problems, and it did in some Opera builds.

This patch changes the code so that there is only one implementation
of the macros and it's the "safe" one, where "safe" means that it
can handle that the underlying object is deleted inside a message
handler without crashing.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2f039d8d93a539c8322caa664e642956c5d6d372
Reviewed-on: https://chromium-review.googlesource.com/995896
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550711}
mpichlinski
Added missing depenencies in chrome/services/media_gallery_util/public/cpp
Bug: 832591
Change-Id: I8d104a7e0ede58f20d71bb5ce00f8b398cf8e28b
Reviewed-on: https://chromium-review.googlesource.com/1012023
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#550643}
fs
Remove LocalFrameView::forcing_layout_parent_view_
This flag is never set to true anymore.

Bug: 442939
Change-Id: I03bc6129d923ff90d39e32b7508bb56cf1139b31
Reviewed-on: https://chromium-review.googlesource.com/1010164
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550313}
bratell
Too many crash_keys::SetCrashKeysFromCommandLine()
When building chrome_app_unittests chrome/common/crash_keys.cc are
compiled both as a dependency and locally. Enough to compile it
as a dependency. (Noticed in jumbo build experiments where the
duplicate symbols met in the linker)

Change-Id: I517436d21ae17c2ff664afeed43ad8e1b7e529e9
Reviewed-on: https://chromium-review.googlesource.com/1005341
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#550207}
mpichlinski
GN: Allow XCode projects to use ICECC environment variables.
Without them XCode cannot compile generated projects with ICECC.

Bug: 831500
Change-Id: I3b50c730660c4e8a6a06b9fda340e20edb87e40a
Reviewed-on: https://chromium-review.googlesource.com/1006577
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#550159}
bratell
More common to include headers than cc files so lets do that
An accidental inclusion of a cc file caused interesting
linking errors (duplicate chrome::kChromeUIPrintURL) in certain
build configurations.

Fix is to include the header instead of the cc file so that
references to chrome::kChromeUIPrintURL will be external as intended.

Change-Id: Iba69dbd17267955534609d308cef16ab0467671d
Reviewed-on: https://chromium-review.googlesource.com/1005342
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#549560}
fs
[CI] Drop redundant |candidate_| prefixes from SearchCandidate helper
Change-Id: I07129786b29acb7eea5fd1946e9301a370472125
Reviewed-on: https://chromium-review.googlesource.com/1002556
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#549167}
fs
[PE] Don't early-out in LayoutSVGText::NodeAtFloatPoint
Since <text> can have descendants that may both differ in visibility as
well as fill/stroke, we can't evaluate pointer-events in LayoutSVGText,
but should rather let LayoutBlock (and SVGInlineTextBox et al) handle
the hit query. This makes LayoutSVGText somewhat similar to the same
method on LayoutSVGContainer.

Bug: 828930
Change-Id: I2767ed149705289e770d5ae165efd910c2c7ff15
Reviewed-on: https://chromium-review.googlesource.com/998352
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549154}
bratell
Made two GetExtensionView() functions into member functions
There were two GetExtensionView functions which clashed in
jumbo build experiments where they ended up in the same
translation unit. This patch makes them member functions which
removes the need to supply an argument, which in turn makes the
code a bit simpler and easier to read.

Bug: 803406
Change-Id: I09fad295de900d6d78092397654314e757761226
Reviewed-on: https://chromium-review.googlesource.com/997774
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#549133}
bratell
Reuse existing AcceleratorMapping struct
The two identical AcceleratorMapping structs clashed in jumbo
build experiments (no offical support of jumbo in this code
yet).

Bug: 803406
Change-Id: I065bfb447de67c05d2f6172ffbdeff4bc68e6538
Reviewed-on: https://chromium-review.googlesource.com/997832
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548810}
bratell
Gave some Mac/Views helper functions unique names
In jumbo experiments (jumbo is not yet supported in
chrome/browser/ui) several GetBubbleAnchorView and
GetBubbleAnchorRect functions clashed. They were more or less
identical but there is no obvious place to share them, and even
though they are small, the code gets messier if you inline them.

This patch gives the functions unique names as a preparation
for jumbo support in chrome/browser/ui

Bug: 803406
Change-Id: I104ae7cc961dd867e89e06fe8f18b401b39af549
Reviewed-on: https://chromium-review.googlesource.com/998158
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548778}
fs
Update 'lighter' and 'bolder' computations to match spec
Update FontDescription::BolderWeight and LighterWeight to match the table
in https://drafts.csswg.org/css-fonts-4/#font-weight-prop .

Bug: 809956
Change-Id: I18cb9a10ef3d86f68113bb0663e5364d0120a739
Reviewed-on: https://chromium-review.googlesource.com/997592
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548741}
bratell
[jumbo] Too many kSha256Hash
Earlier this year, all kSha2Hash got longer names but two
kSha256Hash must have remained, and now they ended up in
the same translation unit and jumbo on Windows stopped
compiling. This renaming follows the pattern of earlier renames.

TBR=thestig@chromium.org

Change-Id: I95b7d6b7e5f43f25bee8e98aa3eeeb4de9d7e55f
Reviewed-on: https://chromium-review.googlesource.com/999415
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548730}
fs
[PE] Improve SVG text selection for vertical text
We were previously always using the "left edge" of the fragment bounding
box when computing the position within the fragment. This works poorly
for vertical text. Use "top edge" for the vertical case instead.

Bug: 829214
Change-Id: I52e0aeffa95d05b1c86cd6aeca5dde7a886db486
Reviewed-on: https://chromium-review.googlesource.com/997792
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548722}
bratell
Rename a function whose name conflicted in jumbo builds
In jumbo build experiments the presence of two different
OnCheckIsDefaultBrowserFinished functions meant that
Bind didn't know which one to bind and it didn't compile.

This patch renames one OnCheckIsDefaultBrowserFinished to
OpenURLAfterCheckIsDefaultBrowser which seems like a good
name for that function.

Bug: 803406
Change-Id: I056e613b7e3d55c0b2dbde68db8d75d3e2c55876
Reviewed-on: https://chromium-review.googlesource.com/998152
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548712}
bratell
Inlined two GetProfileFromWebContents helpers
In jumbo build experiments (no jumbo for chromium/browser/ui yet)
two GetProfileFromWebContents ended up in the same translation unit.
Each of them was only used once. This inlines them both.

I dropped the null check from the GetProfileFromWebContents() in
account_chooser_dialog_view.cc because if that helper returned
null, then the code would already crash inside
GetDefaultStoragePartition() (GetStoragePartitionFromConfig()
will call browser_context->IsOffTheRecord() without any null check).

Bug: 803406
Change-Id: I0200eb42c0a54b674eaec6122e1193c931dd2344
Reviewed-on: https://chromium-review.googlesource.com/997793
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548711}
fs
Adjust weight ranges in FontDescription::Lighter/BolderWeight
Since the (CSS) parser allows numeric weight values in the range
[1, 1000], adjust the ranges in FontDescription::Lighter/BolderWeight
to match that.
Also factor in that the values can have fractions (by implicitly
truncating them) and simplify the range check since there's now a
set of adjacent intervals in practice.

Bug: 828747
Change-Id: I5fe3405ca45ed8016530d995976e36a6ebbcf366
Reviewed-on: https://chromium-review.googlesource.com/995452
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548448}
fs
Nudge click point in svg/custom/use-events-crash.svg
Issue the click in the test further down the rect in the hope that the
selection code won't end up picking one or the other of the <text>s, but
only the one further down.

Bug: 829316
Change-Id: Iae3419bf902a864ea8ec46e69764480c0f240b8a
Reviewed-on: https://chromium-review.googlesource.com/997843
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548430}
bratell
Removing some "using namespace std"
The code guide doesn't allow "using namespace", and they have
a tendency to cause problems with jumbo builds so this is just
a cleanup to avoid possible future problems.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ibf519c5e4ddb0497961f1befa8de416039e4fc61
Reviewed-on: https://chromium-review.googlesource.com/992318
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548386}
bratell
Rename some symbols that were duplicated in cert code
Duplicates of kTrafficAnnotation and g_is_fake_official_build_for_testing
just appeared and caused problems for certain (extreme) jumbo build
configurations.

In jumbo builds much code is compiled in the same translation
unit which means that they share the same anonymous namespace.

This patch renames the variables following the pattern of similar clashes.

(nopresubmit because any changes to net::URLFetcher are currently
 blocked and this just changes a name)

NOPRESUBMIT=true

Change-Id: Ib55f61c2c8a76c235de45f509df493c875a3a12b
Reviewed-on: https://chromium-review.googlesource.com/992313
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548379}
fs
[CI] Cleanup some SVG hit-testing code
...mostly by de-indenting it by reversing the visibility-check. Also
reuse ComputedStyle locals and switch to using a ComputedStyle&.
In LayoutSVGShape::NodeAtFloatPointInternal, the large-ish condition is
split into three slightly smaller.

Change-Id: I275081391a3b399f9887215f4fe3075884de103c
Reviewed-on: https://chromium-review.googlesource.com/995674
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548154}
fs
Reland "Serialize 'oblique' computed values for 'font-style'"
Handling of 'oblique' values were missing in
ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
Because of this the return value needs to be widened to CSSValue.

Expectations for css/css-fonts/variations/font-shorthand.html updated.

TBR=drott@chromium.org

Bug: 809935, 809938
Change-Id: I753324776ba080820bc5c4a14e8aff6237ee5d12
Reviewed-on: https://chromium-review.googlesource.com/995793
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548143}
fs
Revert "Serialize 'oblique' computed values for 'font-style'"
This reverts commit 755a9214dc9116a826f8881851c07e352004a6c5.

Reason for revert: Mid-flight collision with 162e9dda47d694596620b69c5fb23cc7f0f87126 - will update and reland.

Original change's description:
> Serialize 'oblique' computed values for 'font-style'
> 
> Handling of 'oblique' values were missing in
> ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
> Because of this the return value needs to be widened to CSSValue.
> 
> Bug: 809935, 809938
> Change-Id: I1de846595ed955455d57ab9f6ea45326e502a65b
> Reviewed-on: https://chromium-review.googlesource.com/995273
> Reviewed-by: Dominik Röttsches <drott@chromium.org>
> Commit-Queue: Fredrik Söderquist <fs@opera.com>
> Cr-Commit-Position: refs/heads/master@{#548044}

TBR=fs@opera.com,drott@chromium.org,futhark@chromium.org

Change-Id: I379a152245f16fc792c8bfc55a2d8b127ba30820
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 809935, 809938
Reviewed-on: https://chromium-review.googlesource.com/995695
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548052}
fs
Serialize 'oblique' computed values for 'font-style'
Handling of 'oblique' values were missing in
ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
Because of this the return value needs to be widened to CSSValue.

Bug: 809935, 809938
Change-Id: I1de846595ed955455d57ab9f6ea45326e502a65b
Reviewed-on: https://chromium-review.googlesource.com/995273
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548044}
bratell
Give two cert testing classes unique names
A second WrappedTestingCertVerifier and
g_cert_verifier_for_testing just arrived and in some
extreme (non standard) jumbo build configurations those
ended up in the same translation unit. Since translation units
only have one common anonymous namespace, there was a symbol clash.

This patch renames the global variables to
g_cert_verifier_for_io_thread_testing and
g_cert_verifier_for_profile_io_data_testing and renames the classes
to WrappedCertVerifierForIoThreadTesting and
WrappedCertVerifierForProfileIoDataTesting.

Change-Id: I41549bc81943864f64ce304220e20ab00d91c889
Reviewed-on: https://chromium-review.googlesource.com/992494
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548029}
bratell
Avoid having two SendReport functions to not confuse Bind(..).
In certain (extreme) jumbo build configurations, SendReport in
chrome/browser/net/chrome_report_sender.h and
chrome/browser/net/trial_comparison_cert_verifier.cc ended up as
symbols in the same translation unit and then the address
operator didn't know which function to refer to in a Bind(...) call.

This renames the local SendReport in
net/trial_comparison_cert_verifier.cc to SendCertVerifyReport.

Change-Id: I9cc17beb509452f66f5620cf7ea4ca4f1f04ed33
Reviewed-on: https://chromium-review.googlesource.com/992495
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548012}
bratell
Removing some "using namespace WTF" and "using namespace WTF::Unicode"
The code guide doesn't allow "using namespace", and they have
a tendency to cause problems with jumbo builds so this is just
a cleanup to avoid possible future problems.

Change-Id: I058ed20ba072036b1995cf039ddb3c2ffc884483
Reviewed-on: https://chromium-review.googlesource.com/992952
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547996}
bratell
[jumbo] X11/gfx: Need to say ::Display or it's ambiguous.
There are several classes/types named Display so to get
the X11 one, you have to specify it with ::Display (gfx::Display
is a common alternative when you're inside the gfx namespace).

TBR=hubbe@google.com

Bug: 822068
Change-Id: I402b7ad2d37a82d3091577733f3f06e673c29c7e
Reviewed-on: https://chromium-review.googlesource.com/994212
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547916}
fs
[SPv175] Don't crash on <feImage> which reference an element with a mask
This works around a crash where a layout box references a filter that
contains a feImage filter primitive, which in turn reference content
that has a mask applied.

Bug: 814815, 825538
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib2433b3ba48b3ea56462a1eb64209d36aa37cfa4
Reviewed-on: https://chromium-review.googlesource.com/982114
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547802}
fs
Remove unused declarations in SVGFEDropShadowElement
StdDeviationXIdentifier/StdDeviationYIdentifier don't have definitions.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I187cd3d4991e89dc91e6a021771616cd441e0c22
Reviewed-on: https://chromium-review.googlesource.com/992493
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547716}
fs
Update baselines for new Win10 version
Update baselines for

 fast/text/color-emoji.html,
 fast/text/emoticons.html,
 fast/text/international/002.html,
 fast/text/international/wrap-CJK-001.html,
 svg/W3C-SVG-1.1/text-intro-01-t.svg and
 svg/W3C-SVG-1.1/text-intro-04-t.svg

after bots got upgraded (minor changes to font data.)

Bug: 828051, 828260, 828314
Change-Id: I37d8d68348452338a09ae584742e83323713c463
Reviewed-on: https://chromium-review.googlesource.com/991953
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547697}
fs
svg/animations/getCurrentTime-pause-unpause.html no longer flaky
TBR=schenney@chromium.org

Bug: 824930
Change-Id: I123f2d2c7e95e5bbb0dd90abeab57246d312bc54
Reviewed-on: https://chromium-review.googlesource.com/992037
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547674}
bratell
Narrowed scope of a UrlWithoutFragment method
In jumbo builds many files are compiled in the same
translation unit and then their anonymous namespaces will also
be one and the same. In blink/inspector two (identical)
UrlWithoutFragment functions end up colliding. This patch
changes it so that one of them has a more narrow scope.

The patch also removes the special casing of these files
from the build system.

Bug: 713137
Change-Id: If0b8bfb8a13c1191aa4e1c07d2aa1472ed168f29
Reviewed-on: https://chromium-review.googlesource.com/985978
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547653}
bratell
Move editing helper LocalToAbsoluteQuadOf() to a shared file
A commit just added a second copy of LocalToAbsoluteQuadOf
which triggered compilation failures in jumbo builds. This
deduplicates the function by moving it to EditingUtilities.cpp.

Change-Id: Ifee2d67714c18300f84c49e6371c95aaf8b95e9f
Reviewed-on: https://chromium-review.googlesource.com/985834
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#546784}
bratell
Remove the "::" prefix from testing namespace declarations.
Since ::blink::testing was renamed ::blink::test_helpers, the
"::" prefix on testing is no longer necessary. There is no longer
anything that can confuse the compiler regarding what "testing"
means.

Bug: 825768
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibf65dd643185623530ce2f06ddc46fb8be34947a
Reviewed-on: https://chromium-review.googlesource.com/980035
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546783}
bratell
Rename ::blink::testing to ::blink::test
Inside blink there is an ongoing conflict for the code whether
"testing" means ::testing (from gtest) or ::blink::testing. So
far it has been resolved mostly by adding a "::" prefix whenever
::testing was intended, but that is a bit annoying and coding should
not be annoying.

This patch renames ::blink::testing to ::blink::test (aka
"test" in all the code since the code is already
inside blink). That resolves the conflict once and for all and also
adheres to the coding standard that says no sub-namespace may have
the same name as a common top level namespace.

This does *not* move the files to a new directory test.
This does *not* remove all the :: prefixes that are now unnecessary.

Bug: 825768
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie35502b0d5b4f401df104e38600ede878d24bdfa
Reviewed-on: https://chromium-review.googlesource.com/980054
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546491}
bratell
Gave some global variables a g_ prefix to avoid collisions
In jumbo builds many cc files are compiled in the same translation
unit to make the compilation (much) faster. This also joins those
files' anonymous namespace and caused clashes if several files
use symbols with the same name. That happened with two global
"instance_" variables.

This patch renames them g_descriptive_name which matches a common
pattern for naming global variables.

Bug: 803406
Change-Id: I13e84ba5dba717d978ff2a43470e1ca4ab0457b2
Reviewed-on: https://chromium-review.googlesource.com/980880
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#546444}
bratell
Gave two kBubbleReshowsHistogramName unique names
In jumbo builds many cc files are compiled together in the same
translation unit. When that happens, those files will share the
same anonymous namespace so if they use symbols of the same name
they will clash.

That happened with two kBubbleReshowsHistogramName constants in
chrome/browser/ui/exclusive_access and this patch gives
those two more unique names.

Bug: 803406
Change-Id: I2b8e3a060c7b7853a3a001317e80d32b7d6e56d4
Reviewed-on: https://chromium-review.googlesource.com/980879
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546239}
fs
Rewrite svg/animations/getCurrentTime-pause-unpause.html to avoid flakes
The test in it's current form imposed too strict requirements on the
time that had passed. We cannot guarantee a maximum elapsed time, only a
minimum (and barely that...) Rewrite the test to not impose any
restriction on the maximum elapsed time. Also convert it to use
testharness while at it. Also rewrite/convert the sibling test with
setCurrentTime.

Bug: 824930
Change-Id: I79882b0189e44790e3096c8346c2a0bf47276dd8
Reviewed-on: https://chromium-review.googlesource.com/981145
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#546190}
bratell
Rename helper function WriteFile to give it a unique name
In //extensions/browser a second helper function named
WriteFile just appeared and in jumbo builds where all of
extensions/browser is compiled in one translation unit (an extreme
jumbo configuration), the two clash. This patch renames the function
that is the least like base::WriteFile to "CreateDirAndWriteFile".

Change-Id: I0d3dc1bb3e13279a2bf333bc0c12985f2133a35d
Reviewed-on: https://chromium-review.googlesource.com/980056
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546050}
bratell
Use the predefined Android SDK constants instead of numbers
Half the code used the SDK_VERSION_* constants when checking
Android version, half the code used hard coded numbers 19, 21,
22, ....

This changes the code to use SDK_VERSION_ everywhere.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.android:android_arm64_dbg_recipe;master.tryserver.chromium.android:android_compile_x64_dbg;master.tryserver.chromium.android:android_compile_x86_dbg;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Icb4e3183f0490b00d16039681548ccf469e9d236
Reviewed-on: https://chromium-review.googlesource.com/975841
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545870}
fs
Remove outdated DCHECK in SVGUseElement::InsertedInto
This DCHECK was made obsolete by
9b88406d1a87dfeef593c6d1a91beb3a2b696391, since it stopped using the
"pending resource" flag for <use>.

Bug: 825460
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie1202097eb2172ef9ed3866e3a6575fbe4aa09db
Reviewed-on: https://chromium-review.googlesource.com/980252
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545854}
bratell
Remove references to the non-existing android_compile_mips_dbg bot
Per answers on chromium-dev@, the android_compile_mips_dbg trybot
is no more.

Bug: gerrit:8617
Change-Id: I2f23c663d2baf397f30532290300bf2946531ab9
Reviewed-on: https://chromium-review.googlesource.com/980492
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545813}
fs
Reland "[PE] Don't reparse "restart" and "fill" repeatedly"
Rather than doing an attribute lookup in GetRestart() and Fill(), just
map the attributes in ParseAttribute. Pack with active_state_.
Also get rid of the static AtomicStrings.

Noticed while looking at the referenced bug.

Use new accessor GetActiveState() for active_state_ accesses to avoid
stumbling over signedness mismatches.

Bug: 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9adf72cdfcc794885b79be1bfc374554f9382d11
Reviewed-on: https://chromium-review.googlesource.com/979807
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545786}
bratell
Rename TestPrerendererClient since that name is already used
In some extreme jumbo configurations the newly added
TestPrerendererClient class in
Source/core/html/parser/HTMLDocumentParserTest.cpp
compiled in the same translation unit as TestPrerendererClient
in Source/core/exported/PrerenderingTest.cpp and then it
didn't compile.

This patch renames TestPre* to MockPre*/MockWebPre* which also matches
a common pattern when creating mock classes.

Change-Id: Ib800e5e65756bf3c3709d8f570982aaa46dc7cd4
Reviewed-on: https://chromium-review.googlesource.com/980332
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Matthew Cary <mattcary@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545771}
bratell
Gave two kBufferSize constants unique names.
In some (extreme) jumbo configurations on Mac two kBufferSize
constants ended up in the same translation unit and caused
a compilation error. This patch gives them unique names to
not cause any future problems.

Change-Id: I96d5e51024ff99fcb838346726aa1635127841eb
Reviewed-on: https://chromium-review.googlesource.com/978209
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545720}
bratell
Avoid clashes between the kLeftToRight in OSX SDK and WTF::Unicode.
There is a kLeftToRight in OSX's SDK and in WTF::Unicode. If
WTF::Unicode is imported into global scope those might clash and
this happens in some non-standard (extreme) jumbo configurations.

Since "using namespace" isn't allowed per the coding standard,
this just adds the WTF::Unicode namespace to those symbols
that need it.

Change-Id: I97c59e5ffed7d2bd0f8340f5d14b69dc532175d6
Reviewed-on: https://chromium-review.googlesource.com/978205
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545718}
bratell
Use ::testing to not get mixed up with ::blink::testing
There is both a ::testing namespace and a blink::testing namespace
and if you inside namespace blink says "testing", which one you
get depends on what the compiler knows. In jumbo builds compilers
often know about both namespaces and will assume you mean
::blink::testing.

To be sure to get ::testing, you need to prefix it with ::.

In the long run ::blink::testing should probably be renamed. Its
name violates the rule that no sub namespace should have the same
name as a common top level namespace.

Change-Id: I60857ebd08d4b35ce56212d03b4ed63045803402
Reviewed-on: https://chromium-review.googlesource.com/978004
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545717}
fs
[PE] Don't reparse "restart" and "fill" repeatedly
Rather than doing an attribute lookup in GetRestart() and Fill(), just
map the attributes in ParseAttribute.
Also get rid of the static AtomicStrings.

Noticed while looking at the referenced bug.

Bug: 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I19d1244c6034430c30e65c09e20c8f04552b1e5f
Reviewed-on: https://chromium-review.googlesource.com/978246
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545686}
fs
[PE] Restore LayoutObject check in SVGElement::NotifyIncomingReferences
When an element has incoming references that are not in the layout tree
(like an element animated by [multiple] SMIL elements), the overhead of
the hash set insert/erase can be noticable (like for instance in
balls_svg_animation.html.)

Bug: 661598, 769774, 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8a5879186dabd5e071f708ac953b8f1e91b62847
Reviewed-on: https://chromium-review.googlesource.com/978213
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545467}
bratell
Avoid having duplicate StopLoadingInBackgroundEnabled()
This is a jumbo compilation fix. A couple of hours ago a second
StopLoadingInBackgroundEnabled() was added which in jumbo builds
where *.cc files are compiled together caused a compilation failure.

The function is small enough to be inlined so that is what this patch
does here and at the original place it was copied from.

Bug: 820634
Change-Id: I09d8fe48f4573d67b353eda563abad54c2325769
Reviewed-on: https://chromium-review.googlesource.com/978001
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545446}
pkalinowski
Do not use null Uri for camera intent
In case of failure to create a temporary image capture file,
GetCameraIntentTask#onPostExecute will receive null Uri. For capture
fields, this was already handled by aborting file selection.

However, in remaining cases, it would result in an attempt to add this
null Uri as EXTRA_OUTPUT and to convert it to ClipData. The latter
results in NullPointerException.

This change skips processing null Uri in remaining cases. Camera
intent without an Uri can only return small version of the image
directly as a bitmap, but that is unlikely what user can work with
and the rest of the code is not prepared to handle it anyway.

So, abort if mDirectToCamera == true, as there is no useful intent
to show. Otherwise, proceed with null as a camera intent which
will still enable other modes of file selection. This is also
in line with the behavior before the introduction of
GetCameraIntentTask.

Bug: 821440
Change-Id: Ib4024c406bbcaf560e5cdde584c317f1ab6477d2
Reviewed-on: https://chromium-review.googlesource.com/960722
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545440}
wdzierzanowski
Add missing dependency on ppapi_plugin_sources
content_main_runner.cc uses the functions PpapiPluginMain() and
PpapiBrokerMain() from //content/ppapi_plugin/ when
(!is_multi_dll_chrome && enable_plugins) is true.

This fixes the linking of app_shell_helper_app_executable on macOS in a
static jumbo build after
https://chromium-review.googlesource.com/958282.  The error was
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.fyi%2FJumbo_Mac%2F14982%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

BUG=367595

Change-Id: If2dab9414a780aa4f60a70153042608f225b37c0
Reviewed-on: https://chromium-review.googlesource.com/977682
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#545396}
fs
[CI] Move InvalidationMode to SVGResourceClient; pass to clients
In preparation for always invalidating through SVGResourceClient.

TBR=fserb@chromium.org

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I733987de91d1051a72652aba3115e387dc909dbf
Reviewed-on: https://chromium-review.googlesource.com/976063
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545393}
bratell
Reuse existing constants for Android SDK versions
There are constants for Android SDK versions in build_info.h
so nobody has to declare their own. This changes some duplicated
custom constants that clashed in jumbo builds to use the
global constants.

Bug: 598880
Change-Id: I32bc147729e561130eaaf4feab545bd0cd9714c1
Reviewed-on: https://chromium-review.googlesource.com/975641
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545069}
fs
[CI] Add LayoutSVGBlock::GetElement helper
Like the equivalent helper on LayoutSVGModelObject, this provides a more
specific type of Node (an SVGElement), since is guaranteed for
subclasses of LayoutSVGBlock.
Also update the documentation in LayoutSVGModelObject to reflect the
current name.

Bug: 769774
Change-Id: I720af53e5a24e960773059f7d2a113e74bd5bdc5
Reviewed-on: https://chromium-review.googlesource.com/973378
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545034}
fs
[CI] Use ToReferenceClipPathOperationOrNull instead of IsReferenceClipPath
Since DEFINE_TYPE_CASTS now provide a To<type>OrNull, we can use that
instead of essentially open-coding the same thing.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I22113ff36a406d0afc17e5ecf37158e1dec1fe8e
Reviewed-on: https://chromium-review.googlesource.com/973376
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544833}
fs
Remove one hash lookup in SVGResourcesCycleSolver
Make use of the return value from HashSet::insert to eliminate the
preceding Contains().

Bug: 534817
Change-Id: I07ccfb26310801fd7534278550479df299f43d15
Reviewed-on: https://chromium-review.googlesource.com/970961
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544550}
fs
[PE] Don't use callbacks for SVGElement::NotifyIncomingReferences
Dispatch overhead is high.

Bug: 661598, 769774, 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4b200d0076c209584a033be810f95c504e81c102
Reviewed-on: https://chromium-review.googlesource.com/970422
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544431}
fs
Make TranslateTransformOperation::X/Y return const Length&
Also eliminate a few copies in TranslateTransformOperation::Blend.

Change-Id: Icb390e3da70e2c3b651c34758f8e0fefa7bb4484
Reviewed-on: https://chromium-review.googlesource.com/970821
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544377}
bratell
Followup WorkerModuleFetchCoordinater, move test code to shared file
Both the new and old code use an identical ClientImpl test class.
In jumbo builds those end up in the same translation unit and
it won't compile. This patch moves the class to a shared file
WorkerFetchTestHelper.h

Bug: 680046
Change-Id: Iabe58f2f2c93e4d77fb36c8c454952af994d302c
Reviewed-on: https://chromium-review.googlesource.com/968363
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544077}
fs
[CI] Restructure SVGResourcesCycleSolver
Restructure the code so that traversing a LayoutObject's resources is
shared, and rename ResourceContainsCycles to TraverseResourceContainer.
Hoist the side-effects (clearing out resources with cycles) to the
caller.

Bug: 534817, 769774
Change-Id: Icd8200a2cd9073487479e32827a9fdeb1d8d04c4
Reviewed-on: https://chromium-review.googlesource.com/966661
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544037}
bratell
Manually inline the IsTouchOptimized method to avoid jumbo clashes
There is a common helper method IsTouchOptimized() that is a shortening
of ui::MaterialDesignController::IsTouchOptimizedUiEnabled(). That
helper method is placed in anonymous namespaces which are merged in
jumbo builds, causing clashes.

Alternatives are to find a shared location for this method (maybe in
//ui?) or inline it. This patch inlines it.

Bug: 803406
Change-Id: Ia389432bfdb506d27b625c916a9baf73b7b70f30
Reviewed-on: https://chromium-review.googlesource.com/966204
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543939}
bratell
Give two kTextContext unique names for jumbo builds
There are two different kTextContexts in chrome/browser/ui, living
in different namespaces that in jumbo builds become the same
namespace. This patch renames them so that they have
unique names.

This affects Opera builds but not Chrome builds yet since jumbo
is not yet supported in chrome/browser/ui in Chrome.

Bug: 803406
Change-Id: I3354881b9dedae9499356800cbaed4de3cc0da4c
Reviewed-on: https://chromium-review.googlesource.com/966202
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543938}
fs
[CI] Cleanup SVG <pattern> attribute collection
Move the 'href' lookup to a helper function (as seen in the very similar
SVGGradientElement.) Use a similar setup in SVGGradientElement
equivalent method.
Move attribute synchronization from LayoutSVGResourcePattern into
SVGPatternElement::CollectPatternAttributes.
Change the SetPatternAttributes helper to take a SVGPatternElement
reference.
Remove the element null-check in the LayoutObject.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I16901de05437bbeea1981f5340bec1a3e4329b50
Reviewed-on: https://chromium-review.googlesource.com/966221
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#543709}
bratell
Have git ignore the third_party/llvm-bootstrap-install dir
third_party/llvm-bootstrap-install is sometimes created by
tools/clang/update.py and should not disturb git.

Change-Id: Id30390bc0e15e69661828f0124c08475539e3490
Reviewed-on: https://chromium-review.googlesource.com/966421
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543687}
fs
[CI] Stop tracking <*Gradient> 'href' references through SVGResources
Gradient resources are currently only using the 'linked' resource in the
SVGResources object for cycle breaking and change notifications. The
SVG*GradientElements also perform cycle breaking on their own,
disregarding what SVGResourcesCycleSolver has done. The 'href's
themselves are what risk introducing cycles for gradients at the moment,
so handling them explicitly (as is already done) doesn't add any
additional complexity. Mixing resources defined by the DOM with those
defined by style does add complexity though.

This CL stops tracking <*Gradient> href's using SVGResources, and starts
tracking them using an IdTargetObserver in SVGGradientElement, much like
how similar 'href's are tracked.

Bug: 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I5538ede4170c7181098fe2308dbfa640506334f4
Reviewed-on: https://chromium-review.googlesource.com/880965
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543685}
bratell
Solving jumbo build offline_pages clash with base::DoNothing()
Too many SavePageLaterCallback functions caused problems in
jumbo builds. Since two of the three were just empty functions
this patch replaces them with base::DoNothing()

Change-Id: Ie9c939ee10674cdab77aab0a9ade65d70293fb0c
Reviewed-on: https://chromium-review.googlesource.com/964441
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543397}
tmoniuszko
Fix crash on ResetWindowControls with no non-client view
Crash happens when Widget with no non-client view (for example
TYPE_WINDOW_FRAMELESS) is being shown on Windows 7 with Aero Glass
disabled.

This is a regression introduced by
https://chromium-review.googlesource.com/924315.
ResetWindowControls is called from HWNDMessageHandler::OnSysCommand.
Previously it wasn't called if non-client view was null because
ShouldHandleSystemCommands returned false in such case.

Bug: 189112
Change-Id: Ia12013ab11fd67dd28bcaf5d490c846928569a78
Reviewed-on: https://chromium-review.googlesource.com/960029
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543350}
bratell
Disable blink pch for jumbo builds
pch makes jumbo builds slower instead of faster since each
pch file will only be used 1-3 times instead of many times, and
in Blink the pch files contain a lot of code so creating them
takes a long time.

This saves about 20% of the Blink build time on Windows.

Bug: 809010
Change-Id: Ia512646110572e4939e8e3cc1a9cd946b780cb97
Reviewed-on: https://chromium-review.googlesource.com/962785
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543335}
fs
Refactor computed <paint> value handling
Combine all the fields that make up a <paint> into a class: SVGPaint.
Move the bulk of the style builder function for <paint> from the
template to StyleBuilderConverter. This should make future work on
<paint> resolution easier.
Also split the existing setters on {SVG,}ComputedStyle to avoid having
bools to indicate if the "visited" portion should be set or not. The
new way more closely resemble other color properties.
Add accessors to SVGPaint to both make code easier to read, and reduce
the dependence on SVGPaintType.

Bug: 769774
Change-Id: Ifad043c9e423f0fc7aa79fef78e635b2abb4636c
Reviewed-on: https://chromium-review.googlesource.com/961062
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#543333}
bratell
Drop a couple of unused files that broke certain jumbo builds.
A completely unused object file in a static library will be
ignored by the linker, but with jumbo builds unused cc files will
be grouped with used cc files and the object file will no longer
be ignored.

If the cc file contains code that is bad it can then trigger followup
linker errors which happened in this case where debug component
windows builds had too many constructors and destructors for
WebAssociatedURLLoader when building webkit_unit_tests.exe

Change-Id: I16a0332b9e16903481c2995f2176e59a1ba8e53e
Reviewed-on: https://chromium-review.googlesource.com/955850
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542843}
fs
[CI] Transition ReferenceFilterOperation to SVGResource
This CL transitions the ReferenceFilterOperation (used for 'filter')
from SVGElementProxy to SVGResource. It introduces ExternalSVGResource
as a new subclass of SVGResource.
ExternalSVGResource handles loading of an external document, and
notifies clients as needed when said document finishes loading.

Since this leaves SVGElementProxy unused, it is removed together with
some related structures. This also allows some code to be simplified
because we no longer need a TreeScope (or Node) in some places.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If6cbbf32e0269878bdea897fcf0b8e41c062b0f6
Reviewed-on: https://chromium-review.googlesource.com/955684
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542822}
bratell
Give some g_delegate variables unique names
In jumbo builds, many files share the same anonymous namespace
so having a file local symbol name might still clash with other
files having the same file local name.

This patch renames a couple of g_delegate variables that caused
clashes in some (non-default) jumbo configurations.

Bug: 746957
Change-Id: I732d7223be88d4871a4ae7294377bc558a2ac2ca
Reviewed-on: https://chromium-review.googlesource.com/957727
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542767}
ppluciennik
Improved GN code related to resolving paths.
Moved most of the logic related to resolving paths
to ResolvePath and ResolveRelative in filesystem_utils.cc.
Improved SourceDir class to return std::string with resolved path
for cases when returning SourceDir or SourceFile wasn't really needed.

R=brettw@chromium.org, dpranke@chromium.org

Bug: 819720
Change-Id: Ia59da00e83de45431762ebb19a9153471f7e91e3
Reviewed-on: https://chromium-review.googlesource.com/953422
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542692}
fs
Use the same initial type for both 'fill' and 'visited fill'
The initial value used here shouldn't make a difference, so use the
initial value of 'fill' since that looks less confusing. It will also
simplify conversion to a different computed <paint> representation.

Bug: 769774
Change-Id: I5a08f73d4affc28f5804f3c3164051197721b2a4
Reviewed-on: https://chromium-review.googlesource.com/959009
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542552}
bratell
Add an llvm work directory to .gitignore
Change-Id: I2a22b99caa64cc0d1c3b8d74425375b76b1dca67
Reviewed-on: https://chromium-review.googlesource.com/957737
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542511}
fs
Don't invalidate client in SVGResourcesCache::ClientDestroyed
We're just about to destroy said object, and since this is only issuing
"local" (client-only, no ancestors) invalidations they will have no
effect.

Bug: 769774
Change-Id: Ib8d0afecb65a80bd89990906940e792cadcc2dcb
Reviewed-on: https://chromium-review.googlesource.com/958903
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542505}
bratell
Update clang docs since the old text was pre-Win-clang

Change-Id: I9ce1985082125ab6099f3576d6742aaed73d21d7
Reviewed-on: https://chromium-review.googlesource.com/958165
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542487}
bratell
Fix mixup in expected/got in include guard presubmit check
Bug: 814776
Change-Id: If68e4015c54a0b60f9a68b7941fb3e5d14b58502
Reviewed-on: https://chromium-review.googlesource.com/958466
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542469}
fs
[PE] Add "image/apng" to supported image MIME types
Supported for animated PNG (APNG) was added via crbug.com/437662 (commit
7d2b8c45afc9c0230410011293cc2e1dbb8943a7.) The "image/apng" MIME type is
included in the "Accept" header for image requests.

Add "image/apng" to kSupportedImageTypes to allow things like the
<picture> element to work (select an appropriate image based on 'type'.)

Add "image/apng" to kPrimaryMappings to allow the MIME type to resolve
to a reasonable file extension.

Bug: 730588
Change-Id: I070e8b16dc8312552b11dc32e776493b3a5be669
Reviewed-on: https://chromium-review.googlesource.com/957092
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542113}
bratell
[jumbo] Windows build fix related to INITGUID
Generating GUID objects in a binary requires careful juggling
of includes and the define INITGUID (or the header <Initguid.h>).

Jumbo builds are not that careful so the simplest/best solution
is to remove the file doing INITGUID from jumbo compilation.
This manifested itself in jumbo fyi builders building
catalog_viewer_service.exe.

TBR=dtapuska@chromium.org

Bug: 657623
Change-Id: I1457727a0b3a68f82726a2e73c1ae3dedb06f12d
Reviewed-on: https://chromium-review.googlesource.com/955690
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542108}
bratell
Fix jumbo+Win compilation error related to the PostMessage macro
PostMessage is a macro in Windows and depending on whether Windows
headers have been included or not, PostMessage will either be
treated as PostMessage or PostMessageW. We use a special header
windows_types.h to ensure that the macro is always defined
so that there will be no compilation or linking issues missing
either PostMessage or PostMessageW objects.

Bug: 772713,813749

TBR=leon.han@intel.com

Change-Id: I0012774f347ef2e257bc87b4492f58c7be464f78
Reviewed-on: https://chromium-review.googlesource.com/957028
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542092}
fs
[CI] Split out LocalSVGResource from SVGResource
In preparation for adding an SVGResource subclass for external resources
this splits out a LocalSVGResource subclass from SVGResource and renames
usages appropriately. This is mostly to eliminate "noise" from a follow-
up CL.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I479ca0445e4eba5f0ba2b727460dfcda776347b8
Reviewed-on: https://chromium-review.googlesource.com/955463
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542075}
fs
Transition ReferenceClipPathOperation to SVGResource
This CL replaces the use of SVGElementProxy in
ReferenceClipPathOperation with SVGResource. The main change between the
two is when the element reference is resolved ("when used" versus
"when computed".)

This also, by extension, adds infrastructure for invalidation and other
things required to make SVGResource work.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia43f76256a251a15c4dc100461cff9bf728eb188
Reviewed-on: https://chromium-review.googlesource.com/951613
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541771}
fs
[SPv175][PE] Antialias clips for PaintChunks (and FloatClips)
ClipDisplayItems would use/generate antialiased clips, so it makes sense
to carry that bit (literally) forward.
Also update the FloatClip display item code-path for consistency.

Bug: 814876, 819617
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I1433804bd5734857116e613c2342c49d42499ecb
Reviewed-on: https://chromium-review.googlesource.com/934450
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541482}
bratell
Rename devtools GetCommandLine (A Win32 macro)
GetCommandLine is a win32 API macro defined to GetCommandLineW.
Depending on whether <windows.h> is included of not, code using that
name will either get the intended name or GetCommandLineW.

In some build configuration this caused problems when a base class had
GetCommandLine() but the sub class by accident defined
GetCommandLineW.

This patch renames it to GetBrowserCommandLine() which also matches
its more exact documentation.

Change-Id: I882b3f650c97802ec7618a797f93f22e9788078f
Reviewed-on: https://chromium-review.googlesource.com/951584
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541406}
mharanczyk
Fix linking problems caused by //content/test:test_support target on win.
//content/browser/accessibility/accessibility_event_recorder_win.cc in
this target is missing required lib on win in component builds.
In non-component oleacc.lib is added indirectly through
//content/browser:for_content_tests -> //content/browser dependency chain.

The change fixes missing AccessibleObjectFromWindow symbol linking error
for content_unittests and webkit_unit_tests in component build.

BUG: 818856
Change-Id: I1253bbbff5ca346f2fe4f81d0fc71834bb158222
Reviewed-on: https://chromium-review.googlesource.com/951383
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541396}
bpiekny
Remove time dependency from NavigationSimulator
This commit solves issues related to low resolution timers in
content_unittests.

Bug: 791910
Change-Id: If572f967034354ab3d1261c4a576736bc7ba9ac5
Reviewed-on: https://chromium-review.googlesource.com/808586
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Bartosz Piękny <bpiekny@opera.com>
Cr-Commit-Position: refs/heads/master@{#541386}
fs
[CI] Make SVGResource have an IdTargetObserver rather than be one
This switches SVGResource away from inheriting IdTargetObserver, and
makes it have one as a member instead. This should make future
subclassing of SVGResource easier (avoiding GC mixins.) It also has the
side-effect of allowing the SVGURIReference framework to be reused.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I77fed36a06b846f3cd4cbb7722faa3de1b081f59
Reviewed-on: https://chromium-review.googlesource.com/947956
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#541205}
bratell
Resolve conflict between base::StrCat and Win32 StrCat
StrCat is a Win32 API function and it uses a macro to redirect
StrCat calls to StrCatW. That macro will be available when
shlwapi.h has been included but not otherwise so mentions of
StrCat will sometimes refer to StrCat, and sometimes to StrCatW.

This patch makes it always be StrCatW as in many other functions.

Alternatives are to rename base::StrCat or undef StrCat whenever
shlwapi.h is included.

Bug: 817738
Change-Id: I6fca88d7514867ef15e63c8498ddac6a5e9f43dc
Reviewed-on: https://chromium-review.googlesource.com/950923
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541122}
bratell
Hide AddToList from X11 headers since dom_distiller uses that name
components/dom_distiller uses the name AddToList which makes it hard
to combine with X11 headers. It doesn't happen in Chromium but it
happens in jumbo builds in Opera (any maybe in Chromium in the
future).

Bug: 782184
Change-Id: I546c254ed85fbfa86cd0ba06ddd294884c8ba6de
Reviewed-on: https://chromium-review.googlesource.com/950780
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541120}
fs
[CI] Move invalidation out of SVGResources::RemoveClientFromCache
This pushes the actual call to MarkClientForInvalidation out of said
function, leaving it to callers to perform the invalidation.

Bug: 769774
Change-Id: Ib9063899da132a8f31290205ace6a52d5fc8457b
Reviewed-on: https://chromium-review.googlesource.com/946092
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540903}
fs
[CI] Split kLayoutAndBoundariesInvalidation into two flags
Since we already have a kBoundariesInvalidation flag, this means we just
need to rename kLayoutAndBoundariesInvalidation and convert all uses to
bitwise-or the two flags.
The mask/bit checks in MarkAllClientsForInvalidation are adjusted to
reflect this change as well.
A typedef is added to try to better convey that something is a mask and
what of.

Bug: 769774
Change-Id: I30b69458aea8eaea1a3b6b3d023f18d21f2f51f4
Reviewed-on: https://chromium-review.googlesource.com/945928
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#540854}
bratell
Compile fix: Remove chrome_proximity_auth_client.cc
chrome_proximity_auth_client.cc uses easy_unlock_service which
was just moved to be ChromeOS only so chrome_proximity_auth_client.cc
needs to be as well.

If it's compiled and not completely ignored by the linker (most of
the time but not in jumbo builds), it will break the build.

TBR=jhawkins@chromium.org

Bug: 817115
Change-Id: I606cf0958beb6a736bf0717471a6542adde4dc73
Reviewed-on: https://chromium-review.googlesource.com/947962
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540751}
bratell
Made some ui/gl ValidFormat functions into static methods
gl_image_memory.cc and gl_image_native_pixmap.cc would compile
together in a ui/gl jumbo build (not yet supported) and then the
ValidFormat methods would clash and prevent compilation.

This patch moves the functions into the classes that use them.

Bug: 773275
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6f031d0897fd0ef96c536e3e4c97245aa108a024
Reviewed-on: https://chromium-review.googlesource.com/939475
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540553}
bratell
Use a more unique variable name than g_display
In ui/gl there are three different global variables named
g_display. As a preparatory change for jumbo support this patch
renames them g_glx_display, g_egl_display, g_wgl_display.

Bug: 773275
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic469a886632be8bc711bec8359aa5e4fae5ea6a4
Reviewed-on: https://chromium-review.googlesource.com/939479
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540552}
bratell
Add presubmit check for include guards
Missing include guards tend to break jumbo builds and makes
everyone involved sad so better to have a presubmit check for it.

There is a risk that this triggers on correct code so it includes
a way to disable it per source file. Include the string
"no-include-guard-because-multiply-included" and there won't
be any warning for that file.

By popular demand there will also be a warning if the name of
the include guard doesn't follow the coding standards, but since
mistakes are common, that check is only enabled for new files.

Bug: 814776
Change-Id: Id18b3d43288b9a064e537460d667957b355bbd33
Reviewed-on: https://chromium-review.googlesource.com/931761
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540526}
bratell
Updating jumbo documentation.
The default chunk size is not 200 anymore, for a number of
months.

Change-Id: I8370e472628ddcf1c49bdc09d989bdadf3ea78b3
Reviewed-on: https://chromium-review.googlesource.com/946097
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#540517}
bpiekny
Make IsPatternValid available in site_settings_handler
Currently we have IsOriginValid available (AllowJavaScript) but
IsPatternValid doesn't have such call. Looks like we don't need
to have any specific state to call this method

Change-Id: I19c8747f09b5bdd332fb2ce7a209b584023c6a03
Reviewed-on: https://chromium-review.googlesource.com/941950
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Commit-Queue: Bartosz Piękny <bpiekny@opera.com>
Cr-Commit-Position: refs/heads/master@{#540475}
fs
[CI] Sink invalidation out of LayoutSVGResource*::RemoveClientFromCache
This splits the various RemoveClientFromCache implementations into two
parts:

 1) removal of cached data from the resource, and
 2) invalidation of the client.

This avoids triggering invalidations as a side-effect of cache-
invalidation, and separates concerns to help future refactorings. This
also means that resources that perform no caching, or no per-client
caching, need not override RemoveClientFromCache, but can use a default
implementation.

Since a kParentOnlyInvalidation argument to MarkClientForInvalidation is
a no-op, it is removed in the relevant code-paths.

LayoutSVGResourceContainer::MarkClientForInvalidation is made static to
enable its use outside resource containers themselves.

RemoveClientFromCache gets a new semantic in that it returns a bool
indicating if anything was cached for the client (this is currently
needed for invalidation of clients of filters.)

Bug: 769774
Change-Id: I8deeaef8fdd46e6dcc171100e8d6394df483e232
Reviewed-on: https://chromium-review.googlesource.com/941332
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#540193}
fs
[PE] Pixel snap fragment clips
Noticed while enabling AA for clips (in general.) This should prevent
regressing a few multicol tests when enabling AA clips.

Bug: 814876
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I06ad3aa535e7ba0781f0f78fb80e43d8b68d70e4
Reviewed-on: https://chromium-review.googlesource.com/937518
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539838}
bratell
Corrected reused include guards
If the same include guard is used twice, it becomes impossible
to include both those headers in the same translation unit and
that can be hard to debug and understand. This patch renames
some include guards that have the same names (copy/paste) as
existing include guards.

Found while working on a PRESUBMIT test for include guards. It will
not warn for these things, but it was easy to add that test locally.

There are another few thousand files that have wrongly named
include guards. Left as an exercise to the reader.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic7ba08558d3fbae0d3bee843f3092d472f8c643b
Reviewed-on: https://chromium-review.googlesource.com/937712
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539800}
fs
[PE] Make SVGGeometryElement handle 'pathLength' mutations
Since the 'pathLength' attribute moved to SVGGeometryElement, so should
the attribute mutation handling.

Bug: 815170
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I04bc19988f80f3c3fe4810897e3003403c6997c6
Reviewed-on: https://chromium-review.googlesource.com/939625
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539794}
bratell
Jumbo build fix: wincrypt.h and openssl clash
wincrypt.h and OpenSSL headers define the same macros (until
a later version of OpenSSL at least) so therefore we need to
include crypto/wincrypt_shim.h instead which hides the clashing
macros.

TBR=pmonette@chromium.org

Bug: 746957
Change-Id: I629859f8e381ccadfdf9b6d811330bd8fc35be95
Reviewed-on: https://chromium-review.googlesource.com/940225
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539791}
fs
[CI] Referencify MarkForLayoutAndParentResourceInvalidation
Cleanup some (now) unnecessary explicit 'this' dereferences as well.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I49238bf7b32760e5a05f6b6ce41557d34423ea45
Reviewed-on: https://chromium-review.googlesource.com/931508
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539775}
fs
[CI] Share invalidation code for geometry presentation attributes
Much like for geometry attributes - of which these are a subset. Also
push the InvalidationGuard into the invalidation function.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib9254d8ad930ef132c8074a7636eb57f18ae22d5
Reviewed-on: https://chromium-review.googlesource.com/932122
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539460}
bratell
Fix broken forward declaration that introduced a clashing namespace
A forward declaration claimed there was a ::viz::cc:CompositorFrame
class, and that introduction of a namespace ::viz::cc caused
confusion with the ::cc namespace and compilation errors in
some jumbo build configurations.

The real CompositorFrame is in viz::CompositorFrame so fixing
the forward declaration also removed the namespace clash.

Change-Id: I1cd4fe729591855172f5a07aca2e2c7f3e8db9fa
Reviewed-on: https://chromium-review.googlesource.com/939390
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539441}
fs
Remove ImageElementBase::SourceDefaultObjectSize
After https://chromium-review.googlesource.com/716679, this method has
no callers. Remove it.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3e2f427c8349bfa410718cd24782f64c7ad2e0e0
Reviewed-on: https://chromium-review.googlesource.com/735861
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539306}
fs
[CI] Factor out common "geometry attributes invalidation" code
All the SVGGeometryElements share the same code-sequence for
invalidation of attributes that define the geometric shape.
Move this code to SVGGeometryElement::GeometryAttributesChanged.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I78eabe6245eff618dff810d7bcfc120b9a99f545
Reviewed-on: https://chromium-review.googlesource.com/931802
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539218}
bratell
Correct some include guards found by PRESUBMIT test
There is a PRESUBMIT test coming for include guards and these
are some of the files that trigger that test. Both because of
code outside the include guard (bug) and slightly wrong syntax
for the #define (irrelevant).

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I486fd56d6ef506064cda38504728771549ebc6fb
Reviewed-on: https://chromium-review.googlesource.com/937709
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539210}
fs
[CI] Reduce LayoutSVGResourcePaintServer dependencies on LayoutObject
In preparation for passing/using an SVGResourceClient as the 'client',
make sure the LayoutObject& is only used as a cache key by extracting
and passing the object bounding box as a separate argument.

Bug: 769774
Change-Id: I673ef74f2e65d645037a65d85e75846f37d3859b
Reviewed-on: https://chromium-review.googlesource.com/931465
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539206}
bratell
Fix "shadow" warning/error in jumbo builds
There are local variables named next_id so having a global
variable with that name triggers -Wshadow warning. This
patch renames the global next_id -> g_next_indexed_db_connection_id.

Change-Id: I31925418e69999ea789fef856058ab66125f60fa
Reviewed-on: https://chromium-review.googlesource.com/937206
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539184}
bratell
Correct some broken include guards.
Found while working on a PRESUBMIT test for include guards.

Change-Id: Ib622cbaae28c48a469337076b57f5139971baff5
Reviewed-on: https://chromium-review.googlesource.com/932662
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539155}
yorenault
[Linux] Only mark event as handled when it is actually handled
views::View that don't have a context menu controller
still mark the click event as handled,
forbidding further processing of this event.

Bug: 814666
Change-Id: Ie9ab6e0f0e573a4d653a52995421ac1075c686fb
Reviewed-on: https://chromium-review.googlesource.com/925269
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538835}
bratell
Rename a couple of g_instance to allow extreme jumbo
We just got two g_instance in //base and to allow the whole of
base to compile in a single translation unit (not a default
configuration even among jumbo users) it's better if they
have unique names.

Bug: 775547
Change-Id: Ie1a1a856932ae46bde754878108097a94e6e00c6
Reviewed-on: https://chromium-review.googlesource.com/931121
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#538512}
bratell
Add include guard to WebFontTypefaceFactory.h
Newly added header missing include guard. There is a presubmit
check coming to catch these since they break some builds.

TBR=drott@chromium.org

Change-Id: Ie705b6b3404bcb67d829bcc1a7ba449daf1cb277
Reviewed-on: https://chromium-review.googlesource.com/931881
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#538503}
bratell
Removed unused line of code in merge_for_jumbo.py
Change-Id: I27525f1c02214fdb6fc04564abc417cdb472ee53
Reviewed-on: https://chromium-review.googlesource.com/931464
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538479}
bratell
Be explicit when mixing ::switches and ::headless::switches
There is both a ::headless::switches and a ::switches
namespace and if they are both known then "switches" inside
::headless will refer to ::headless::switches. This happens
in some jumbo build configurations.

with the same name as a top level namespace for this reason but
there are some such cases in the code that would be non-trivial
to change.

Note: The style guide strongly discourages using sub namespaces
Change-Id: I0c35abbb43caa53e725cc44a80b93083123374fa
Reviewed-on: https://chromium-review.googlesource.com/931125
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538424}
jl
Reland "Enable jumbo/unity build for //content test support targets"
This is a reland of a20415fc04f992b5e7e0d600572589c0317fdd95.

Original change's description:
> Enable jumbo/unity build for //content test support targets
> 
> Change-Id: Ibc5e0d946c57a4a3be7fc24a9c0773ec830514f0
> Reviewed-on: https://chromium-review.googlesource.com/922822
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Jens Widell <jl@opera.com>
> Cr-Commit-Position: refs/heads/master@{#537257}

Change-Id: I09ad8c813e0b2f7dfec9a867f4b4b1a5e9092b12
Reviewed-on: https://chromium-review.googlesource.com/925604
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#538118}
jl
Rename one BlobStorageContextGetter function
In jumbo/unity builds, it conflicts with the function with the same
name that is declared in content/browser/download/download_utils.h.

Change-Id: I6e19c76dca926fbd13ae2c804b92ab454fe2d0dc
Reviewed-on: https://chromium-review.googlesource.com/926343
Reviewed-by: Nick Carter <nick@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#538093}
fs
[CI] Use color enumeration in SVGPaintContext::PaintForLayoutObject
The code in its current form gives the impression that there's a
dependency on the initial value of the 'fill' property, while all we
really want to say here is 'black'. Use a more direct approach.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib75ba965c585771e9a009f91f0055a592a37c1b0
Reviewed-on: https://chromium-review.googlesource.com/926845
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#537861}
jl
Enable jumbo/unity build for various //extensions targets
Change-Id: I4685aaade618b0ea68750688eeca2fc0d24364c9
Reviewed-on: https://chromium-review.googlesource.com/922821
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537786}
bratell
Remove unused includes that collide with OpenSSL includes.
wincrypt.h and OpenSSL can't be in the same translation unit
since both define X509_NAME. There is a crypto/wincrypt_shim.h
to use instead of wincrypt.h but in this case the includes were
left by mistake when code moved elsewhere and can be removed.

This fixes jumbo build in Windows.

TBR=pmonette@chromium.org

Bug: 746957
Change-Id: I3fa0dadaf8e423302c353bfb7bc7e5484b58ff68
Reviewed-on: https://chromium-review.googlesource.com/924223
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537625}
jl
Generate jumbo source files into `invoker.target_gen_dir`
This typically means a path based on the directory containing the
BUILD.gn file that defined the jumbo target, which generally makes
sense.

The old solution of finding a suitable directory by looking at the
directories containing the target's source files can generate the
same name for multiple targets, meaning such targets can't all be
jumbo enabled. This is rare, but is the case for the targets

  //extensions:test_support

and

  //extensions/browser:test_support

since the former has source files from //extensions/browser/ that
end up being used as the target directory.

Change-Id: Ie0c9ee2fcef25c6b0705e0fed3f1dce060459537
Reviewed-on: https://chromium-review.googlesource.com/924023
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#537623}
bratell
Prevent OpenSSL and msi.h clashes by setting _MSI_NO_CRYPTO
third_party/OpenSSL and msi.h both indirectly define X509_NAME so
to have avoid them clashing, tell msi.h to not include wincypt.h where
X509_NAME is set.

This became a problem in jumbo builds where msi_util_win.cc was grouped
with code using browser_process.h which includes openssl headers.

Bug: 746957
Change-Id: Ibaaf60ab6b5b46f9a86e90e0f5a7de9d4ecd57d7
Reviewed-on: https://chromium-review.googlesource.com/924072
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537304}
bratell
Support jumbo in chrome/browser, saving another 10% compile time
Of the code pieces left to add jumbo support to, the one which benefit
the most from jumbo is //chrome/browser:browser which goes from 90 to
10 CPU minutes, a reduction of more than a CPU hour. This is about 10%
of the total effort compiling chrome+content_shell+blink_tests.

In jumbo builds many cc files compile in the same translation unit
which reduces the time spent generating debug data and machine code
for headers, as well as the time to actually process the headers.

Bug: 746957
Change-Id: I856f3fca1f16fa2b0738678444c455c303985962
Reviewed-on: https://chromium-review.googlesource.com/899368
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537284}
jl
Enable jumbo/unity build for //content test support targets
Change-Id: Ibc5e0d946c57a4a3be7fc24a9c0773ec830514f0
Reviewed-on: https://chromium-review.googlesource.com/922822
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#537257}
fs
Simplify/improve ElementStyleResources "is sprite" heuristic
The HasBackgroundImage check is redundant because the helper function is
called within an equivalent check.
Also change so that current layer is checked, rather than always
checking the first (top-most) layer. Update the test to include a case
where doing this will help.
Rename the helper method to BackgroundLayerMayBeSprite since it's no
longer operating on a ComputedStyle.

Change-Id: Ibfabfc4a3c68d042ab356f43cb6031697d4daf98
Reviewed-on: https://chromium-review.googlesource.com/852255
Reviewed-by: rajendrant <rajendrant@chromium.org>
Reviewed-by: Scott Little <sclittle@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#536998}
bratell
Jumbo compile fix: renamed two content/browser symbols
Recent additions created duplicate symbols in content/browser
of the variable g_url_loader_factory_callback_for_test and of
the method BlobStorageContextGetter. BlobStorageContextGetter is
a duplicate method but small enough that it's probably ok.

This renames one BlobStorageContextGetter to
BlobStorageContextGetterForStorage (lacking a suitable place for
sharing the method) and one of the
g_url_loader_factory_callback_for_test variables to
g_create_network_factory_callback_for_test to better describe what it
contains.

These errors don't appear in the jumbo configurations covered by
the bots because the files are far enough apart in file lists
to normally not be grouped with each other.

Change-Id: I17ecc36d2271c71f6b7affcc41ef4935b107743f
Reviewed-on: https://chromium-review.googlesource.com/915367
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536987}
bratell
[jumbo] Stop complaining about strange files in sources
People put lots of files in gn's sources lists. Rather than
being upset, jumbo should just live with it. They do no harm
and can be safely ignored.

Change-Id: I15c3930cfeb50e5bd7ce121ca7b7c17db088b63f
Reviewed-on: https://chromium-review.googlesource.com/916246
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#536978}
fs
Setting "" as <track> 'src' should fail the first time
When setting a track .src to "", we would resolve the URL to a null URL,
which matched the default initialized HTMLTrackElement::url_, meaning
that readyState was not advanced and no 'error' event fired in this
case.

Extend the "url == url_" check with a check for readyState differing from
'none'. Also rewrite HTMLTrackElement::getReadyState to avoid using
EnsureTrack().

Bug: 811713
Change-Id: Icd190492639c53e09a7e018202b69ac6e919a94c
Reviewed-on: https://chromium-review.googlesource.com/916004
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#536685}
bratell
Renamed an enum value DEBUG->DEVTOOLS to avoid a Windows macro
Windows's ATL headers (atldef.h) does
#ifdef _DEBUG
#define DEBUG
#endif

which makes it hard to also use the word DEBUG in code that might
intentionally or accidentally be compiled with that header. This
happened in jumbo build experiments where many cc files are compiled
in the same translation unit for dramatically faster compilation.

This preparatory patch for jumbo in chrome/browser renames an
enum value from WebappInstallSource::DEBUG to
WebappInstallSource::DEVTOOLS.

Bug: 746957
Change-Id: I128018246b94310c0cee67eaa404ab7749bd3ae0
Reviewed-on: https://chromium-review.googlesource.com/902042
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#536325}
fs
[CI] Add SVGGradientElement::InvalidateGradient
Add a new helper method on SVGGradientElement that encapsulates the code
that invalidates the gradient data/cache. Use this method where
appropriate.

Add an InvalidateCacheAndMarkForLayout overload taking a
LayoutInvalidationReason to LayoutSVGResourceContainer, and use it in
SVGElement::InvalidateRelativeLengthClients and the new method, which
also takes a LayoutInvalidationReason to improve fidelity of reporting.

The change to use SVGGradientElement::InvalidateGradient in
ChildrenChanged constitutes a minor change in behavior since it
previously didn't have the SelfNeedsLayout() check. Said check should be
reasonable to have in this code-path as well though.

Bug: 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia5c318a4df958960aabb56f71ad3c384791a46b0
Reviewed-on: https://chromium-review.googlesource.com/913688
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#536107}
fs
[CI] Move SVGTreeScopeResources::Resource to its own file
Make it no longer be an inner class and rename to it SVGResource.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ifb60050cf6d3ebea360f00209031dbc7b0995d23
Reviewed-on: https://chromium-review.googlesource.com/911112
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#535780}
bratell
Added base::TimeToISO8601 and deleted all other instances
It is not uncommon to want to convert from base::Time to an
ISO-8601 string so instead of having half a dozen implementations,
it's better to have one implementation.

This was noticed in the jumbo project because two of
the implementations ended up in the same translation unit.

Bug: 746957
Change-Id: Ib88832c53930aff7a6c24a0df81afc28cbbecc35
Reviewed-on: https://chromium-review.googlesource.com/895456
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#535691}
mpichlinski
Fixed missing mojo interfaces dependencies for bindings_modules_impl.
Bug: 803441
Change-Id: Ie076c368a0dbfb8178362bb8a79e29f0feff9197
Reviewed-on: https://chromium-review.googlesource.com/873642
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534968}
bratell
Jumbo build fix: Use unique names of constants in message_center
A recent CL got rid of the shared constants and instead copied
them to relevant files. To work in jumbo builds they must then
have unique names.

(The alternative to find a shared location for the constants
seems not applicable in this case)

Bug: 783018,723882
Change-Id: I8e64dcf56bfe74d30279549291e89bdec80bc3d2
Reviewed-on: https://chromium-review.googlesource.com/905304
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534793}
fs
[CI] Reference-ify SVGResources/SVGResourcesCache
Make the SVGResources and SVGResourcesCache interfaces take a
LayoutObject& instead of a LayoutObject* where appropriate, and then
update users (transitively) as reasonable.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Idfa28bb01551332064ca1ab6d6260d29d3264145
Reviewed-on: https://chromium-review.googlesource.com/904529
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#534789}
bratell
Avoid using the Windows type SpeechRecognizerState
SpeechRecognizerState is an enum in the Windows platform
API for speech so using that name for a Chrome internal
type means that you get compilation errors if the platform
headers and the internal headers end up in the same
translation unit.

In jumbo builds that could happen (and in general it can also
happen) so this renames
SpeechRecognizerState -> SpeechRecognizerStatus
to avoid that.

An alternative would be to move the enum to a different, more
limited, scope.

Bug: 746957
Change-Id: I479470340ea2c582480b2692424a15bc6fb4581a
Reviewed-on: https://chromium-review.googlesource.com/901247
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534709}
bratell
Moved some duplicate password_manager constants into shared code
chrome/browser/password_manager had a couple of trivial constants
and helper functiosn defined multiple times.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. With multiple
definitions of a constant, with the same name, you get compilation
errors.

In preparation for jumbo in chrome/browser, this patch moves the
constants into the shared file and it removes a random
constant for "". The code doesn't normally use constants
for "".

Bug: 746957
Change-Id: I069e6c9e18b23ce4597c9f23aee829f85e2d17a1
Reviewed-on: https://chromium-review.googlesource.com/897814
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534438}
bratell
Only compile notification test code into tests
The file mock_itoastnotification.cc was compiled for the
chrome.dll binary instead of being in the test_support section
with the test-only code.

Noticed in jumbo build experiments since it ended up in a larger
obj file where the code was no longer ignored as before, ending
with a linker error because of inconsistent settings.

Bug: 746957
Change-Id: Ibf259cb729889f26226ff87b068fa1051898b11d
Reviewed-on: https://chromium-review.googlesource.com/901627
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534425}
bratell
Deduplicate some lookup keys in the profile keys
Some lookup keys were defined multiple times which caused problems
for jumbo build experiments.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch moves the
common constants into ProfileAttributesEntry so they can be used
by all the callers.

Bug: 746957
Change-Id: I58a4d4fb10834c50ec3dd0a6b03e10f284120bce
Reviewed-on: https://chromium-review.googlesource.com/895367
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534419}
bratell
Inlined a small media_galleries helper function
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. With multiple
definitions of an albeit small helper function, you get collisions
and compilation errors.

In preparation for jumbo in chrome/browser, this patch inlines the
helper function GetMTPDeviceDelegate since it's small, and could be
made smaller

Bug: 746957
Change-Id: I492606b21595c3ae5d961e260befdee2e0df0b5c
Reviewed-on: https://chromium-review.googlesource.com/901183
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534408}
bratell
Remove dead enum BrowserProcess
Nobody is using the BrowserProcess enum in
chrome/browser/memory_details_win.cc and in jumbo builds
it clash with the BrowserProcess class in
chrome/browser/browser_process.h.

Bug: 746957
Change-Id: Ib946dd4a05b36e99df070726e20672ca687393f2
Reviewed-on: https://chromium-review.googlesource.com/901602
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534393}
bratell
Renames two GetScoreDictForSettings methods
When building with jumbo many files are compiled in the
same compilation unit and then they will share the same
namespaces, including the anonymous namespace. If code
use the same names those will clash and cause compilation
errors.

There are two more or less identical GetScoreDictForSettings
methods, one in site_engagement_score.cc, one in
media_engagement_score.cc but since there is no
good place to merge them, this just renames them. These
files are now on a list to be refactored to solve the
code duplication.

Bug: 746957
Change-Id: I8e853e761df1c8c0a31c7f2064c0d70f0610d5f8
Reviewed-on: https://chromium-review.googlesource.com/868438
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Mounir Lamouri (slow) <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri (slow) <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534386}
bratell
Avoid using the Windows macro PLATFORM_UNKNOWN
windows.h defines a macro PLATFORM_UNKNOWN (value 0) which
means that if that word is used in a header, that header can't
be mixed with windows.h and still compile successfully.

This collision happened in jumbo experiment so to avoid that
this patch renames PLATFORM_UNKNOWN -> PLATFORM_UNSPECIFIED

Bug: 746957
Change-Id: Id2045a7682d499181d5ea53c4ceb3ed98236005b
Reviewed-on: https://chromium-review.googlesource.com/901266
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534382}
fs
[PE] Update/fix UA stylesheet for SVG roots in shadow trees
The the UA stylesheet would not set 'transform-origin' correctly for
<svg> outermost roots being direct descendants of the shadow root.

Update the UA stylesheet to fix this, and also match what's currently
specced by CSS transforms [1]. Removing prefixes as appropriate.

[1] https://drafts.csswg.org/css-transforms/#transform-origin-property

Bug: 808228
Change-Id: Ic36ce331797eb7ba80a046af88d22c08fe76d6fc
Reviewed-on: https://chromium-review.googlesource.com/901263
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534371}
bratell
Prevent FocusIn and FocusOut from leaking from x11.h
FocusIn and FocusOut are function names in parts of the code. To
make sure that X11 headers don't cause problems, even in jumbo
builds, this patch moves those constants to the x11 namespace.

Bug: 782184
Change-Id: I6c694557653c7c1119a134960a59a38a2670b103
Reviewed-on: https://chromium-review.googlesource.com/891322
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534270}
bratell
Deduplicate a helper function in android/ntp
The function GetRemoteSuggestionsScheduler was defined
twice which caused some problems for jumbo build experiments.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
a function twice (with the same name) will then result
in compilation failures.

In preparation for jumbo in chrome/browser, this patch moves the
helper function to its own file because no existing place seemed
to work fine.

Bug: 746957
Change-Id: I581c5f3815949081989156701c3591bcbf866782
Reviewed-on: https://chromium-review.googlesource.com/897613
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534269}
bratell
Inlined some kZeroTime constants in metrics/desktop_session_duration
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constant twice with the same name will then result
in compilation failures.

In preparation for jumbo in chrome/browser, this patch inlines
the constants in chrome_visibility_observer.cc and
desktop_session_duration_tracker.cc.

Bug: 746957
Change-Id: I1b7d4b2f4a83a8a75c248f07199af6f4e72e87f5
Reviewed-on: https://chromium-review.googlesource.com/897533
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534198}
bratell
Gave three OnAcquireFileAccessPermissionDone their own names
In jumbo builds many cc files compile in the same translation
unit and if that causes there to be overloaded functions,
the address operator won't know what function's address the
code refers to. This happens in base::Bind, and results
in compilation failures.

In preparation for jumbo in chrome/browser, this patch renames
the three OnAcquireFileAccessPermissionDone to
OnDownloadAcquireFileAccessPermissionDone
OnThrottleAcquireFileAccessPermissionDone
OnOfflinePageAcquireFileAccessPermissionDone

Bug: 746957
Change-Id: I6bd1fa44e9cc1ab44d9bdb653dd8117280ff9325
Reviewed-on: https://chromium-review.googlesource.com/897943
Reviewed-by: Cathy Li <chili@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534197}
bratell
Deduplicate some chrome/browser/android constants and helpers
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constants and helper functions in several files will
then result in compilation failures.

In preparation for jumbo in chrome/browser, this patch
deduplicates the GetWebContents() helper function and the constants
kOMADrmMessageMimeType, kOMADrmContentMimeType,
kOMADrmRightsMimeType1, kOMADrmRightsMimeType2.

Bug: 746957
Change-Id: Ie268f77c7a099a8de01ae08c70870306f38fc05a
Reviewed-on: https://chromium-review.googlesource.com/897612
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534182}
bratell
Deduplicated or renamed supervised_user variables
This is a preparatory patch for jumbo compilations where several
cc files are compiled in the same translation unit. Then you get
compilation errors if they all define their own kNumRetries and
kBackoffPolicy, kApiPath and so on.

This patch gives the 5 different kNumRetries variables and 3
different kBackoffPolicy variables in chrome/browser
their own name. It also renames kApiPath, kApiUrl and kApiScope.

It also deduplicates a kAuthorizationHeaderFormat string that had
4 different instances.

Bug: 746957
Change-Id: Ib14ccaa372d3b28cd505b2e7cec519a5635e3173
Reviewed-on: https://chromium-review.googlesource.com/868335
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Cathy Li <chili@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534084}
jl
Drop conflicting `kIgnoreRoutingId` constant
In jumbo/unity builds, it conflicts with another constant in bindings/
api_event_listeners.cc (that has a different value.)

This particular constant didn't seem to add too much. It was only used in
one place; in a function with a comment that talks about the constant's
value. It could be argued that the code is easier to follow if the (very
simple) function implementation then uses the value directly. (In
particular since the "value" is in fact the name of another constant.)

Change-Id: I728a34b0a8b43382e742c6b640ace3baadc4d2db
Reviewed-on: https://chromium-review.googlesource.com/897489
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534008}
jl
Rename conflicting `ReadAndDeleteFile()` functions
They conflict in jumbo/unity builds.

Since one read a file as binary data (into a `std::vector<uint8_t>`) and
one as text (into a `std::string`), it seems reasonable to change the
names to `ReadAndDeleteBinaryFile()` and `ReadAndDeleteTextFile()`.

Change-Id: I8d8402c64cfe45132df9640bd5664df28742d6d7
Reviewed-on: https://chromium-review.googlesource.com/897603
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534007}
jl
Rename conflicting `g_client` variables in anonymous namespace
They conflict in jumbo/unity builds.

Change-Id: Ie5eae8aa303f5a163eabb74ff931f696127ff032
Reviewed-on: https://chromium-review.googlesource.com/897602
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534005}
jl
Declare string constants in named namespace instead of anonymous
In jumbo/unity builds, some of the constants conflicted with (identical)
declarations in the anonymous namespace in verified_content.cc.

Change-Id: I66e9ecb180e99cfd468c914ddce44613a5013242
Reviewed-on: https://chromium-review.googlesource.com/897604
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#533999}
jl
Rename conflicting `Static` classes/structs
They conflict in jumbo/unity builds.

Also rename the overly generic `g_static`/`g_lazy_instance` variables.
They did not conflict with anything currently, but generic names in the
anonymous namespace are likely to become a problem eventually, sadly.

Change-Id: Ie90ca3c7eee3d357c3aca205a5551034b768eb77
Reviewed-on: https://chromium-review.googlesource.com/897488
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#533993}
bratell
Rename some history_report functions to have unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the functions with the same names will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
a number of helper functions in chrome/browser/android/history_report
to have unique names.

An alternative would have been to make the functions static private
functions inside the classes.

Bug: 746957
Change-Id: I2df32461d170c5411418cab78abc3020dc0a8109
Reviewed-on: https://chromium-review.googlesource.com/897536
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533841}
bratell
Use the right ref count macros for base::Bind call
chrome/browser/android/cdm/media_drm_credential_manager.cc sent
a g_browser_process->system_request_context() into a Bind call
without using any ref counting macros. That is prohibited by the
bind system but the code got away with it when the pointer
was just forward declared so that Bind didn't know that it was
a ref counted type.

In jumbo builds the compiler knew more about the return type of
g_browser_process->system_request_context() and failed to compile
because of static_asserts in bind_internal.h.

This patch adds base::Unretained() since that seems to be the
right macro for this type of value.

Bug: 746957
Change-Id: Idfc3ad9bd6708dbc5ef4f295397d05d961595b4a
Reviewed-on: https://chromium-review.googlesource.com/897535
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533839}
bratell
Use different names for two offline_pages delegate classes
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two classes with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two classes named DefaultDelegate so that they have different names.

Bug: 746957
Change-Id: I15cdab5fd9e51223a76d295991513e6e815e3c51
Reviewed-on: https://chromium-review.googlesource.com/897942
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533765}
bratell
Have one kMHTMLExtension constant instead of two
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constant several times will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch
deduplicates the kMHTMLExtension constant and puts it in the
utility class.

An alternative would be to use the literal string "mhtml" without
going through a constant at all.

Bug: 746957
Change-Id: I869f15c17bcf14a633a3e0711c7e469159e3083f
Reviewed-on: https://chromium-review.googlesource.com/897944
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533764}
bratell
Gave three constants in feature_engagement unique names
In jumbo builds many cc files compile in the same translation
unit and then they all share the same anonymous namespace. If
two or more variables have the same name, they will cause
compilation errors and that happened with the three
kDefaultPromoShowTimeInHour constants.

As a preparatory patch to jumbo in chrome/browser this renames
those by adding a relevant prefix to each of them.

Bug: 746957
Change-Id: If17d8103a6916c14b493e203e445208bb1b1b2d6
Reviewed-on: https://chromium-review.googlesource.com/893273
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533728}
fs
[PE] Support 'pathLength' for <path>s referenced from <textPath>
A 'pathLength' attribute on a <path> referenced from <textPath> will
affect the starting offset on the path as computed from 'startOffset'
attribute.
Refactor the PathPositionMapper setup a bit so that the start offset is
computed together with all the other path related state.

Bug: 803127
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id12c88580dd74db403598d2aa05ac9764ad68cdb
Reviewed-on: https://chromium-review.googlesource.com/897626
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533712}
bratell
Give all the different kTrafficAnnotations unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
all the chrome/browser kTrafficAnnotation variables so that they
don't share the same name. This is an equivalent change
to what was already done in //content a couple of months back.

Bug: 746957
Change-Id: I4972cbb767720ac8114b9a01878df1f3ea32a735
Reviewed-on: https://chromium-review.googlesource.com/895369
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533610}
bratell
Use different names for two settings lookup functions
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two functions that fetch a DictionaryValue settings object so that
they have different names.

Bug: 746957
Change-Id: I109751abd13397b61e2eceaccbd95decf493d0c4
Reviewed-on: https://chromium-review.googlesource.com/895368
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533609}
bratell
Giving some ssl metrics functions unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two methods with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
some functions and metrics related to ssl interstitial pages.

Bug: 746957
Change-Id: If8218168d38a7ddae9f2fcdb09b2956018aacd8f
Reviewed-on: https://chromium-review.googlesource.com/895370
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533608}
bratell
Use different names for different histogram constants
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
some page_load_metrics constants so that they have unique names.

Bug: 746957
Change-Id: Ibfad7c1dbb7b193a2afca5998e5265ec7f8df896
Reviewed-on: https://chromium-review.googlesource.com/895455
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533427}
bratell
Gave two tracing OnUploadComplete methods unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two methods with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two OnUploadComplete methods. They are identical so an alternative
is to find a common definition for them but they are also tiny,
really just 1-2 lines of code, so it is not a big thing to have
two of them.

Bug: 746957
Change-Id: I39835ee002fb48216211c37c4c3d047c1dff2eaa
Reviewed-on: https://chromium-review.googlesource.com/895457
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533398}
fs
[PE] Fix edge-cases in SVGGeometryElement::PathLengthScaleFactor
Update the computation of the scale factor to match what the spec [1]
has to say about a value of zero: i.e yield (near) infinity rather than
zero. Also update the case where the computed path length is zero.

[1] https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute

Bug: 803127
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6816b6bdd47cbaee90e8ad22e16d1dcf44498c7d
Reviewed-on: https://chromium-review.googlesource.com/893184
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533003}
fs
[CI] Remove broken IsSVG*Element overload
The:

 template<typename T> bool IsSVG*Element(const T*)

overload is a remnant after RawPtr<T>, but in its current form it would
only produce infinite recursion.

Also update some nearby documentation and rewrite the const Node&
overload to use the same form of condition as the other ones.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iecbc75423010bf26383dfd7504831bf1768a722d
Reviewed-on: https://chromium-review.googlesource.com/893270
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533001}
bratell
There is both ::prefs and ::metrics::prefs so be explicit
When code inside metrics say "prefs" the default assumption is
that it means "::metrics::prefs", *if* the compiler knows that
::metrics::prefs exists. This code wants to use ::prefs which
failed in jumbo build experiments where the compiler knew
that ::metrics::prefs exists.

This patch makes the namespace lookup explicit by writing
::prefs instead of just prefs.

Higher level: The coding standard discourages sub namespaces with
the same name as a top level namespace so it is possible
::metrics::prefs should change name at some time.

Bug: 746957
Change-Id: Ia68378e6a3e7937f5d1b2ebcc960b9111e426fe6
Reviewed-on: https://chromium-review.googlesource.com/890455
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#532934}
bratell
Gave two BindConnectorRequest methods unique names
In jumbo builds, many cc files share the same anonymous namespace
since they are compiled in the same translation unit. Then
methods that would otherwise not clash cause symbol collisions.

This patch renames two identical BindConnectorRequest methods.
A better fix may be to find a shared location but there is no
obvious shared location between media/casting and pepper/flash.

Bug: 746957
Change-Id: I80b4806140720824fefd1d0019537b6fd89683da
Reviewed-on: https://chromium-review.googlesource.com/878363
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532181}
bratell
Correct include guard in aom_context_ax_tree.h
A trailing "}" was not included in the include guard so if
included multiple time, you would get "extraneous }" errors.

Change-Id: I32582e928220ee9428acbefa9a4833d9d36d2eec
Reviewed-on: https://chromium-review.googlesource.com/888581
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#532172}
fs
Fix operator precedence in SizesCalcParser
Pop all operators with greater/equal precedence rather than just the
top-most.

Bug: 803824
Change-Id: I5f106a0e82ed98ba2510c86ed157bf4b133cb5b8
Reviewed-on: https://chromium-review.googlesource.com/888919
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#532100}
bratell
Allow error free multiple inclusion of print_messages.h
In jumbo builds, there is no careful inclusion of headers
so files that require very careful handling of when they are
included cause problems. One such file was print_messages.h
because of an undef it did of another include guard.

This patch moves the undef one layer out of print_messages.h
so that print_messages.h itself can be included many time.

Bug: 746957
Change-Id: Ie44fe5dbd4665cc487788fe7b6e42ebcd20cc50f
Reviewed-on: https://chromium-review.googlesource.com/878325
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532092}
Avoid loading v8_context_snapshot.bin if it's disabled at build-time
Don't list the context snapshot in the mojo manifest's required_files
in builds with use_v8_context_snapshot=false. Tweak existing manifest
overlay functionality to allow merging of required_files lists from
multiple manifests.

This avoids an "Ignoring invalid file v8_context_snapshot.bin" warning
on each browser stratup in use_v8_context_snapshot=false builds.

Bug: 804293
Change-Id: I0f4731811044980b7466887bedcaf115ee1fb288
Reviewed-on: https://chromium-review.googlesource.com/878371
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Tomasz Śniatowski <tsniatowski@vewd.com>
Cr-Commit-Position: refs/heads/master@{#532088}
fs
[CI] Avoid using FillLayer::Size() in BackgroundImageGeometry
FillLayer::Size() returns a FillSize, which is made up of a copy of the
FillLayer's |size_length_| and |size_type_| fields.
This is unnecessarily costly (both in cycles and bytes/footprint), so
use the appropriate (const) accessors instead.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I678095d4d9cb8a1b44a7fad7c7e7cf25c4557225
Reviewed-on: https://chromium-review.googlesource.com/883345
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531529}
msimonides
Add support for include_dirs to gn check.
With this change "gn check" no longer assumes all #include paths are
relative to the source root. Instead it searches for the includes by
checking each of the directories listed in include_dirs for the target.

A number of new issues have been discovered. The trivial ones have been
fixed, the larger and more complex ones have been reported and the related
parts of the project have been excluded from the default gn check run.

BUG=794926

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I39c17a7ac47dc024dd374c8891ce4911809195cb
Reviewed-on: https://chromium-review.googlesource.com/827014
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531334}
bratell
Give some kFilteredMessageClasses variables unique names
In jumbo builds multiple cc files are compiled in the same
translation unit and then they will all share the
anonymous namespace which can cause collisions if
variables have the same name. That was the case for two
kFilteredMessageClasses variables.

This renames them to:
kExtensionFilteredMessageClasses
kRenderFilteredMessageClasses

This is a followup to an equivalent change done in //content
https://chromium-review.googlesource.com/721279

Bug: 746957
Change-Id: I959600adcc81dbd6e405c25aa0272acefc0387d9
Reviewed-on: https://chromium-review.googlesource.com/878362
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#531325}
bratell
Gave two kNotificationPrefix strings unique name
In jumbo build experiments, two kNotificationPrefix variables
ended up in the same translation unit and clashed. This patch
gives those two variables unique names.

Bug: 746957
Change-Id: I200e9cb47129a1f20b8edec91ff0ff432a3c22d9
Reviewed-on: https://chromium-review.googlesource.com/874072
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531324}
fs
[CI] Move SVG dependency graph notification into SVGElement
This moves a chunk of code pertaining to notifications of dependent
elements from a helper LayoutSVGResourceContainer.cpp, thus collection
all such operations within the realms of the SVGElement DOM.

Bug: 454767, 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I18b9a982b43767f2d8f0b8f458ea93e5bdd5e786
Reviewed-on: https://chromium-review.googlesource.com/881502
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531285}
fs
[CI] Use TransformationMatrix::Zoom in SVGElement::CalculateTransform
Replaces Scale(1 / zoom) and Scale(zoom) with Zoom(1 / zoom), and merges
the two ApplyTransform calls into one.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If36fe60292adf4ac0a02030415e6756fc7305ea8
Reviewed-on: https://chromium-review.googlesource.com/880959
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531268}
fs
[CI] Use FloatSizeForLengthSize and FloatPointForLengthPoint some more
Some callsites that are currently using FloatValueForLength would be
better suited using the "pair" helpers (either LengthSize or
LengthPoint.) Also remove an almost-duplicate and use the one from
LengthFunctions.h instead.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic628bfe32b07f000054a9da3bf58c3eb6894d241
Reviewed-on: https://chromium-review.googlesource.com/881341
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531264}
bratell
Removing dead engine_ field i libjingle_xmpp
Jumbo build experiments noticed that no code ever read engine_
in XmppIqEntry in libjingle_xmpp. Normal build didn't because
"friend class XmppEngineImpl" required the compiler to know
what XmppEngineImpl does as well.

Bug: 777434
Change-Id: I661a5346617a92ee912060bebf35801dbe1a8797
Reviewed-on: https://chromium-review.googlesource.com/873371
Reviewed-by: Tommi <tommi@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531039}
bratell
Have only one function named DidStartWorker
Both content/browser/background_sync and
content/browser/service_worker had local functions named
DidStartWorker. If those ended up in the same translation unit,
which can happen in extreme jumbo configurations
(jumbo_file_merge_limit = 999999999) there would be a collision.

This renames them to unique names, just to make things easy.

Change-Id: I33dbc5ad2f5eee6a8e89e0e7624ba033774e3fdb
Reviewed-on: https://chromium-review.googlesource.com/873926
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530938}
fs
[CI] DOM-based SVG resource tracking (1/n)
This starts the transition away from tracking SVG resources based on LayoutObjects.
In the new (probably transitional) model, the resources are track via a Resource
object (inner class) on SVGTreeScopeResources. These Resource objects are
IdTargetObservers, meaning that id mutations no longer are tracked via hooks in
SVGElement. The "pending resource handling" mechanism is also moved to the Resource
objects in the form of a "pending clients" set. The old mechanism (i.e
NeedsPendingResourceHandling() and BuildPendingResourcesIfNeeded()) are no longer
needed and hence removed.

Next step will be to eliminate all remaining tracking logic from
LayoutSVGResourceContainer.

Somewhat independently, a new entry point ResourceReferenceChanged is added to
SVGResourcesCache, codifying the sequence that previously involved calls to
ClientStyleChanged and MarkForLayoutAndParentResourceInvalidation.

Bug: 454767, 661598, 769774, 784435
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I268f2e2a2a5e2e01f077a6b0a5b6270f668a2a6f
Reviewed-on: https://chromium-review.googlesource.com/689998
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530930}
bratell
Gave two kUrlKey variables unique names
In jumbo builds, two kUrlKey constants (with the same string value)
ended up in the same translation unit and this renames them to
avoid colliding. A better fix would be to find a good common
location.

Bug: 746958
Change-Id: I7c0f0e19455c5ab070a8e0e16714f84ee205133d
Reviewed-on: https://chromium-review.googlesource.com/874071
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530897}
tmoniuszko
Make sure LayoutScrollbarPart margins are integers
Bug: 801123
Change-Id: I875cd6431b9ac5e9cded7ab947242d451e889d04
Reviewed-on: https://chromium-review.googlesource.com/860929
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#530885}
bratell
Move and deduplicate ProfileLoadedCallback
There were 4 identical ProfileLoadedCallback methods and a TODO
to move them somewhere. This makes it one shared method in
NotificationDisplayServiceImpl.

This change was triggered by a jumbo symbo collision between these
ProfileLoadedCallbacks and one in profiles/profile_window.cc

Bug: 746957
Change-Id: Ic30c5883d9741b6cf5829ec4fe1481e7d32655dc
Reviewed-on: https://chromium-review.googlesource.com/878222
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530875}
bratell
Inline a duplicated kCrlfLineEnding constant
A kCrlfLineEndine constant was recently copied from
QuotedPrintable.cpp to MHTMLArchive.cpp which caused problems
in certain non default jumbo build configurations because of
the symbol clash.

MHTMLArchive.cpp already uses the literal string "\r\n" all over
the place and no other code in Blink uses a constant for CRLF
so inlining the constant both makes the code consistent and
solves the symbol clash.

An alternative would be to create a shared kCrlfĹineEnding constant,
for instance in platform/test/LineEnding.h, and use it all over
Blink.

Change-Id: I280e9f6217e68d79f764397c469f2022d0f9dc04
Reviewed-on: https://chromium-review.googlesource.com/878219
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530842}
tmoniuszko
Add missing includes to hwnd_message_handler_delegate.h
Bug: 796644
Change-Id: I9c0b2ecc77eb72e97dec373297d2b2031ad68c82
Reviewed-on: https://chromium-review.googlesource.com/873648
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#530826}
fs
[CI] Remove LayoutObject dependency from CSS*GradientValue
Rather than passing a LayoutObject around we can pass around the
<Document, ComputedStyle> tuple that is the bits of data that is needed.

While a it, change CSSGradientValue::GetStopColors to return the vector
of Colors instead of using an out-variable.

Bug: 803224
Change-Id: Ib89bf3c0e47495886b5b715504a90b262348c6f2
Reviewed-on: https://chromium-review.googlesource.com/875925
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530626}
fs
[CI] Share more text-clip masking code between NG and non-NG painters
Split out a PaintTextClipMask method and make that virtual instead of
PaintFillLayerTextFillBox. Move PaintFillLayerTextFillBox to
BoxPainterBase and call PaintTextClipMask for the bits that differ.

Bug: 803382
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie44a64a6e70eac8a5a1029650fd206fc9b2852f7
Reviewed-on: https://chromium-review.googlesource.com/874074
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530573}
fs
[CI] Remove unused argument from CSSImageGeneratorValue::AddClient
An "empty" size is always passed to AddClient, so the argument can be
removed. This also allows simplifying the caching logic (since the
size is always empty, which won't create a cache entry.)

Also change the find()+insert() sequence for |clients_| to use
only insert() instead, saving a hash lookup. Simplify the SizeAndCount
constructor since it never needs any non-zero initialization.

Bug: 803224
Change-Id: I7efc7a130e8e93c1e2680116c429cb93e57d2d3f
Reviewed-on: https://chromium-review.googlesource.com/876086
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530547}
bratell
Inlined a GetLocalState() method
The GetLocalState() method in cryptauth clashes with another
GetLocalState() in jumbo builds, and since there is only one
caller off this one, it might as well be inlined.

Bug: 746957
Change-Id: I63e33c5c94930cd0dfeaa27c1421ce81c9865feb
Reviewed-on: https://chromium-review.googlesource.com/873922
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530357}
bratell
Deduplicated a usb helper function, GetBrowser()
Two files both used identical helper functions, GetBrowser(). This
patch moves that function to a common utility file so that
there is only one.

This was noticed while doing jumbo compilation experiments, where
the double GetBrowser() ended up in the same translation unit.

Bug: 746957
Change-Id: I8ceaab0d4bd08395821b296dbd1bbda13c1aef78
Reviewed-on: https://chromium-review.googlesource.com/873921
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530344}
fs
[CI] Rework size-based caching logic in CSSImageGeneratorValue
Rather than (ab)using AddClient/RemoveClient when updating the
cache for a client, move the actual cache to a helper class
(GeneratedImageCache) and then call the appropriate methods on
that object instead.

Bug: 803224
Change-Id: Ifbb3edf8f25dbeef2f9f1fdd9840a0b32991e274
Reviewed-on: https://chromium-review.googlesource.com/873875
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530261}
fs
[PE] Fix background-blend-mode interaction background-clip: text
When applying background-blend-mode to a background layer that uses
"background-clip: text", perform the blending after the background has
been clipped by the text.

Bug: 803382
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie834b1503ec90341aec846f4d2dfc8c94732fe12
Reviewed-on: https://chromium-review.googlesource.com/873636
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530232}
bratell
Avoid "using base::Time;" because of X11 Time typedef
if any X11 header has been included, there is an unavoidable
Time typedef in global scope. When there is also a
"using base::Time;" both end up in the global scope which
cause compilation issues. Specifically this happened in
jumbo build experiments.

Bug: 803406
Change-Id: Ib7cd99b98552a209d1432ecb4ee060d16c9da39f
Reviewed-on: https://chromium-review.googlesource.com/873976
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530215}
bratell
Avoid "using base::Time;" since Time is an X11 typedef
X11 headers have an unavoidable typedef that creates the
type ::Time. "using base::Time" in the global scope will
clash with that one if X11 headers are included in the
translation unit.

A few files in the chrome/browser target has "using base::Time"
and those cause issues if you try to use jumbo (unity) compilation
for chrome/browser. This patch changes the code to be more
explicit.

Bug: 746957
Change-Id: I619c589071a01302086d81fdce35e0c779b121a0
Reviewed-on: https://chromium-review.googlesource.com/866838
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530109}
bratell
Gave two OnFetchComplete methods more descriptive names
When experimenting with jumbo (unity) builds in Chromium
two overloaded OnFetchComplete ended up in the same
translation unit and then Bind() could not determine which
one to use.

This patch gives two OnFetchComplete methods more unique and
descriptive names: OnCookieFetchComplete and
OnAppCacheInfoFetchComplete.

Bug: 746957
Change-Id: Ie165f6dd8365257181ba7f48b9b5809043ec25f3
Reviewed-on: https://chromium-review.googlesource.com/860462
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529797}
bratell
Removed "using namespace" from a password_manager file
"using namespace" is not allowed by the coding style, and also
it is not compatible with jumbo builds. This patch removes
using namespace and gives the three symbols namespace prefixes
instead.

Bug: 746957
Change-Id: Ibf3810287deb370ad1ac90968ba0e24020f681fb
Reviewed-on: https://chromium-review.googlesource.com/868334
Reviewed-by: Maxim Kolosovskiy <kolos@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529757}
bratell
Fix erroneous DictionaryValue forward declaration
Claiming that there is a ::DictionaryValue is not true and
it clashes with other code doing using base::DictionaryValue.

Fix is to do the forward decalaration in the right namespace.

Bug: 746957
Change-Id: I777dd92baaec876cd2085911e00a96c74efe58f2
Reviewed-on: https://chromium-review.googlesource.com/866843
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529716}
bratell
Gave kUploadContentType and kCrashMultipartBoundary unique names
crash_service_uploader.cc and webrtc_log_uploader.cc are similar
and use variables named the same. If those files end up in the
same translation unit in a jumbo build, they will clash and break
the compilation.

Since there is no good place to share the two strings, this patch
gives them unique names.

Bug: 746957
Change-Id: Ic349606814cff229529b135f3c1da11ac2279158
Reviewed-on: https://chromium-review.googlesource.com/867918
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529710}
bratell
Gave three kDefaultUpdatePeriod variables unique name
This is a preparatory patch for adding jumbo support to
chrome/browser. If more than one kDefaultUpdatePeriod variable
ended up in the same translation unit, they would clash and
cause compilation errors.

Bug: 746957
Change-Id: Iff2579b15fa00648823a4a3bf890b40252856028
Reviewed-on: https://chromium-review.googlesource.com/868155
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529706}
bratell
Replacing custom http status constants with net::HTTP_*
A couple of places defined their own kHttpResponseOk which
is a bit unnecessary when there already is a net::HTTP_OK which
the rest of the code uses.

This was noticed in jumbo build experiments because two
kHttpResponseOk ended up in the same translation unit and caused
compilation errors.

Bug: 746957
Change-Id: Ia5cf32636bbcf8e0e1d7b8e1c161c5b4a5cdcbdf
Reviewed-on: https://chromium-review.googlesource.com/868156
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529705}
bratell
Give each ShutdownNotifierFactory class its own class name
In jumbo builds many cc files are compiled in the same translation
unit and then classes with the same name, that are normally
shielded from each other, can start clashing and causing
compilation errors.

One observation is that there are many ShutdownNotifier classes and
this patch gives each a long and unique name following the typical
naming standard.

Bug: 746957
Change-Id: I2bcca0ac41685fdf78c491ed969b91669e520772
Reviewed-on: https://chromium-review.googlesource.com/867919
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529504}
bratell
Remove erroneous UsbDevice forward declaration
There is no ::UsbDevice so forward declaring such a class confused
other code trying to import ::device::UsbDevice into the global
scope with using device::UsbDevice. This happened in jumbo build
experiments.

Bug: 746957
Change-Id: If1073d24b9e4c302b0873e91df386039c526c49f
Reviewed-on: https://chromium-review.googlesource.com/868331
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529429}
bratell
Give two GetAllOriginsInfoCallback methods unique names
In jumbo build experiments the two very similar files
browsing_data_cache_storage_helper.cc and
browsing_data_service_worker_helper.cc were compiled in the same
translation unit and then the methods with the same name
collided.

This gives the methods unique names to avoid that.

Bug: 746957
Change-Id: I261c61fb178178c91d3a6aac8800e21510038ed8
Reviewed-on: https://chromium-review.googlesource.com/868333
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529426}
fs
[PE] Fix offset computation for multi-line flow box 'background-clip: text'
Since the background of a flow box is painted in a 'sliced' fashion, the
paint rect/offset will be offset based on the "virtual" position of the
line box relative to the first line box in the flow.
When painting text for 'background-clip: text', adjust with this offset.

Bug: 658326
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia12c3d65025199fbcdeb1df647df08174ae88c24
Reviewed-on: https://chromium-review.googlesource.com/868151
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529425}
fs
Fix offset-anchor alignment for offset-path
The anchor point should align with the point on the path/shape/...

Also avoid recomputing transform-origin in ApplyMotionPathTransform
since the function takes origin_x/y as arguments, so those can be used
rather than recomputing the value(s).

Change-Id: I3c173cdc3d307057a37564a37b0e87044dbeaf9d
Reviewed-on: https://chromium-review.googlesource.com/808885
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529282}
bratell
Deduplicate IsScaleAndIntegerTranslate
There are two identical implementations iof IsScaleAndIntegerTranslate() in
components/viz/service/display. One in skia_renderer.cc and one in
software_renderer.cc.

When building components/viz with jumbo (not yet on master) those end
up in the same translation unit and cause compilation errors.

This CL deduplicates the functions and puts it in a shared utility file,
renderer_utils.cc.

Bug: 801580
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ifcc39032bffcfcb752cee60719689d94dfbd2df6
Reviewed-on: https://chromium-review.googlesource.com/864643
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529245}
bratell
Restore the UNICODE macro after third_party/ced has undefined it
third_party/ced (more specifically
third_party/ced/src/util/encodings/encodings.h) undefs UNICODE
which is a central define in Windows. It controls whether
Windows SDK headers should have 2 byte or 1 byte strings and must
always be set in a modern application.

In Jumbo builds this include of the dangerous ced header happen
in the same translation unit as the include of Windows headers
which will then fail to do the right thing.

Restoring the UNICODE define is a workaround.

This change is to make every include of the header do the same
thing. There is not currently any known problem from this instance of
the include.

Change-Id: Ic4a5386e61390533061e0021dddfb0fc4dad8e7e
Reviewed-on: https://chromium-review.googlesource.com/862402
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528919}
bratell
Restore the UNICODE macro after third_party/ced has undefined it
third_party/ced (more specifically
third_party/ced/src/util/encodings/encodings.h) undefs UNICODE
which is a central define in Windows. It controls whether
Windows SDK headers should have 2 byte or 1 byte strings and must
always be set in a modern application.

In Jumbo builds this include of the dangerous ced header happen
in the same translation unit as the include of Windows headers
which will then fail to do the right thing.

Restoring the UNICODE define is a workaround.

Bug: 775547
Change-Id: I7323cf6f9fff3efe2780c3125b9b099a8f9faa09
Reviewed-on: https://chromium-review.googlesource.com/861883
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528803}
fs
[PE] Fix hit-test of zoomed <clipPath> 'clip-path'
<clipPath> geometry is not subjected to zoom, so the hit-test location
and reference box has to be adjusted to make the coordinate spaces
match.

Bug: 800605
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic03e24f0289a5019ea722e3931f6217d918a1b56
Reviewed-on: https://chromium-review.googlesource.com/859784
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#528743}
jl
Share implementations of `GetPerContextData()`
There were some largely duplicated functions that fetched per-context
data objects, optionally creating them if missing. Replace them with a
template function.

This also fixes the issue in jumbo/unity builds that the different
GetPerContextData() functions collided.

Change-Id: I04197a01aa647a07c026eca1ba9c158742fedf3e
Reviewed-on: https://chromium-review.googlesource.com/850115
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528739}
jl
Rename conflicting `CallbackHelper` functions
They conflict in jumbo/unity builds.

Change-Id: I29da5bde4bb2d99b6fa93aaf163c79d160b30c69
Reviewed-on: https://chromium-review.googlesource.com/860650
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#528736}
bratell
Don't compile unused multiprocess_test.cc for ios and nacl
The file multiprocess_test.cc was being compiled for ios and nacl
and then, normally, discarded by the linker since nothing in the
object file was referenced. In jumbo builds the unused code
piggy-backed on used code and then the linker noticed that
multiprocess_test.cc referenced non-existing symbols and linking
failed.

Change-Id: Id14e125d1f62fc0cefeb919ad63e8457bb680407
Reviewed-on: https://chromium-review.googlesource.com/860064
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528713}
bratell
Include tcmalloc's config before tcmalloc.h
Certain things in tcmalloc.h depend on tcmalloc's config.h file,
for instance whether struct mallinfo exist or not. Depending
on how the functions are used, it may or may not work correctly
without including config.h, but to be safe, always include it.

This was an issue in jumbo builds if base/process/memory_linux.cc
and base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc
were compiled in the same translation unit. The wrong includes from
memory_linux.cc caused the other file to fail to compile.

Bug: 775547
Change-Id: Iab9b8172281c55b8cbfbc8c21a79f95d2bae5847
Reviewed-on: https://chromium-review.googlesource.com/860646
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528704}
fs
[CI] Add intrinsic-dimensions-changed notifier to FrameOwner
This CL adds a notifier callback that is called whenever a property or
attribute that may affect the intrinsic dimensions of an <svg> is
changed - this includes 'width', 'height' and 'viewBox' as well as
'writing-mode' and font properties.
At present this callback doesn't do anything, but is expected to
eventually schedule a layout on the embedding object.

Bug: 442939, 798974
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I761ccaaec6b5dec20c2bfa4b5f06cf16d6c7eb24
Reviewed-on: https://chromium-review.googlesource.com/860932
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528689}
bratell
Give two PrefixTitle functions more unique names
When experimenting with jumbo builds (Chromium unity builds) in
chrome, the compiler ended up with two PrefixTitle in the same
translation unit. By using more unique names, that is not a
problem anymore.

The methods are similar and there are other methods building
titles that share similar patterns but there does not seem
to be any useful refactoring that reduces the number of methods.

Bug: 746957
Change-Id: I82f3ce3dd88ef024bb935d09895befda3e5bf76b
Reviewed-on: https://chromium-review.googlesource.com/860461
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528688}
amlynarczyk
Cleanup extensions unittests to use constant for extensions settings preference
Bug: 
Change-Id: I00d7ff48486400e111150cad2b654dd2700a90b6
Reviewed-on: https://chromium-review.googlesource.com/861625
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528620}
fs
[CI] Refactor replaced element nested intrinsic sizing info extraction
This moves the access to a nested layout contexts (either a frame
embedded via LayoutEmbeddedObject or an SVG image via LayoutImage)
LayoutReplaced (LayoutSVGRoot) from LayoutReplaced to the relevant
subclasses (LayoutEmbeddedObject or LayoutImage.) The goal with this is
to eliminate the use of EmbeddedReplacedContent in LayoutReplaced.

Rather than accessing EmbeddedReplacedContent() and calling
ComputeIntrinsicSizingInfo() on the returned LayoutReplaced, a new
method GetNestedIntrinsicSizingInfo is added instead, and implemented in
the relevant subclasses. In LayoutImage the EmbeddedReplacedContent()
method is kept around (for now), but in LayoutEmbeddedObject it's
removed, and instead rerouted via LocalFrameView.

NeedsPreferredWidthsRecalculation is moved from LayoutEmbeddedContent to
its subclass LayoutEmbeddedObject since this is the only subclass that
can modify its behavior - i.e can represent content that may can affect
the size of its embedder.

The IntrinsicSizingInfo struct is moved out from being an inner class of
LayoutReplaced.

Bug: 798974
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia617a40d631e6b2e6bb2c9f39a1799766d7f58d6
Reviewed-on: https://chromium-review.googlesource.com/860140
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528524}
bratell
Avoid exporting read_buf renaming from zlib
zlib.h includes a macro that renames read_buf->Cr_z_read_buf. Since
read_buf is a common name in other parts of the code, it causes
some random confusion depending on whether zlib.h has been
included or not.

The renaming macro is a side effect of the 0001-simd.patch that
exposes an internal read_buf method to other files in zlib. This
patch renames read_buf as it is exposed so that it has the less
common name deflate_read_buf.

Bug: 799448
Change-Id: Icdc4eba973891dfd28d82017415048eded62d577
Reviewed-on: https://chromium-review.googlesource.com/852257
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528512}
bratell
Changed g_instance and g_factory to more unique names
Jumbo, the Chromium unity build system, combines many cc files
in the same translation unity. Those cc files will share the
same anonymous namespace so there can be clashes if names
are not unique enough.

In //chrome there is a lot of variables named g_instance or
similar and in jumbo builds some of them collide. This patch
gives all of the g_instance* variables more specific names, in
a very similar fashion to what was done in //content.

Bug: 746957
Change-Id: Idb2c64b2289aa0487fd62fd140498af909986079
Reviewed-on: https://chromium-review.googlesource.com/846769
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528489}
bratell
Fixing include guards for MetricsHelper include files
Newly added file had no include guards which made it be included
many times in jumbo builds, breaking those builds and two other
header files had the same include guard so you could only include
one of them.

TBR=altimin@chromium.org

Change-Id: I6dc277b6c3a1129a640fd15d2743f875a021925a
Reviewed-on: https://chromium-review.googlesource.com/860038
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528410}
fs
[CI] Remove unused arguments to CSSImageGeneratorValue::GetImage
The Document and ComputedStyle are not used. (This also makes it look
less like the other GetImage method on this object.)

Change-Id: I920497b6c835223bcc558669f1014d832787da9c
Reviewed-on: https://chromium-review.googlesource.com/860100
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528400}
bratell
Changed an html code constant kDefaultWidth to have a unique name
In certain jumbo configurations HTMLCanvasElement.cpp and
track/vtt/VTTRegion.cpp end up in the same translation unit
and then the two different kDefaultWidth clash.

This patch gives kDefaultWidth more specific names and
changes the constants to be constexpr and be in an
anonymous namespace to better match the current coding style.

Change-Id: I116171382d172ff00c20eec13210494393190fc9
Reviewed-on: https://chromium-review.googlesource.com/859781
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528323}
bratell
Deduplicate two dom helper methods.
There were two ShadowFor and two CanBeDistributedToV0InsertionPoint
methods which clashed in certain jumbo build configurations
(when FlatTreeTraversal.cpp and flag_tree_traversal_ng.cc ended
up in the same translation unit).

If this knowledge is widely needed, maybe the methods should move
to Node, but this just makes the old code use the method in the
new code.

Change-Id: Ia26f6fa2631e72ddf5bfdcb5150486025bb1d4a8
Reviewed-on: https://chromium-review.googlesource.com/859759
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528309}
bratell
Deduplicate printing HoldRefCallback helper
Both print_job.cc and print_job_worker.cc wanted a helper
function for certain callbacks. Rather than having two of them,
let us have one.

Bug: 746957
Change-Id: If770b8f18479847489d9c2a28ba1b1d75bdc11e1
Reviewed-on: https://chromium-review.googlesource.com/857501
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528083}
jl
Use ':' directly instead of declaring a `kColon` constant
In jumbo/unity builds the constant declarations conflicts with an identical
declaration in socket_permission_entry.cc.

Change-Id: Ib5d2770caa327119407f618073ac2316bc1a5a9c
Reviewed-on: https://chromium-review.googlesource.com/849213
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527981}
bratell
Correcting include guard for safe_browsing/features.h
Change-Id: Ie3bbe6779eeb321c72b76a255549afd10d9eb460
Reviewed-on: https://chromium-review.googlesource.com/853869
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527955}
bratell
Deduplicate a CreateExtensionPrefStore helper function
Noticed while experimenting with jumbo in chrome/browser. Symbols
that are duplicated cause compilation problems if they end up
in the same translation unit.

Bug: 746957
Change-Id: I07a5bcb690026359e7d74be81a0a26ce9f40958b
Reviewed-on: https://chromium-review.googlesource.com/846747
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527631}
bratell
Deduplicate some icon handling code and symbols in task_manager
Jumbo build experiments handled the multiple GetDefaultIcon
and g_default_icon pointers badly and since the code was more
or less identucal, this patch moves the code to a shared location
and leaves just the icon constant and the icon cache in
each task_manager Task class.

Bug: 746957
Change-Id: Ib7dc221113b29b5e6d17c22539ccb47da1b6a5ce
Reviewed-on: https://chromium-review.googlesource.com/852216
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527518}
fs
Clean up includes in Style*Image.cpp
Get rid of includes of LayoutObject.h and StyleResolver.h, replacing
them with something more appropriate (layering-wise for the former.)

Change-Id: I759c371d557d008bdb385fc3bdcfa440bff33c9d
Reviewed-on: https://chromium-review.googlesource.com/852493
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#527374}
jl
Rename conflicting `g_instance` variables
They conflict in jumbo/unity builds.

Change-Id: Ia1a1bb20873e4695e742ab485027a5185415d175
Reviewed-on: https://chromium-review.googlesource.com/849932
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#527966}
bratell
Give each kPublicSHA256 variable a unique name
This patch is preparing for jumbo build support in
//chrome/browser. Since each component has its own
kPublicSHA256 variable with its own public key, and those
variables clash in jumbo builds where all installers are combined
in a single translation unit, they are here given unique and
descriptive names.

Bug: 746957
Change-Id: I7fe1c927d58fd323e8a80897c45d639e24f8a38d
Reviewed-on: https://chromium-review.googlesource.com/850558
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527287}
jl
Improve jumbo chunk generation code
The main improvement is that source files with unhandled extensions
other than .h, for example .json and .idl, are not counted towards the
merge limit, and thus can't lead to too many chunks being generated.

By restructuring, the code also iterates the source file list once
instead of twice, and calls get_path_info() once per source file instead
of twice.

Change-Id: I130c815c84fff08b6ad2d6f36434140efbeb2d29
Reviewed-on: https://chromium-review.googlesource.com/850397
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527099}
jl
Use a fully qualified name to access the `::switches` namespace
In jumbo/unity builds, `::extensions::switches` comes into scope, which
changes the meaning of the "relative" `switches::` qualifier used inside
the `extensions` namespace.

Change-Id: I49757b132e51bb4207a6fac4dac1e8d2237d5801
Reviewed-on: https://chromium-review.googlesource.com/849212
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#527967}
bratell
Renamed one of the HeaderFlattener classes
There are two HeaderFlattener classes that do similar things
but not identical things. If they end up in the same
translation unit (can happen in some extreme jumbo configurations)
there will be a clash so this patch renames one of them to
HeaderToString.

Bug: 746953
Change-Id: I1fa37f86bcf13487fd8b18da766f440b3ad85545
Reviewed-on: https://chromium-review.googlesource.com/848915
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527078}
jl
Drop some jumbo-incompatible namespace aliases
Many source files declare a namespace alias `errors` for a specific
namespace containing error constants. This practice is incompatible with
jumbo/unity builds, when different namespaces are aliased.

The by far most common namespace to alias is `manifest_errors`. These
aliases are kept, since they are not a problem as long as there are no
other conflicting aliases. Other aliases are simply dropped, and the full
namespace is used instead.

Change-Id: Ie90f7e7a8f8be52b811b0b1e9c9839970669d96c
Reviewed-on: https://chromium-review.googlesource.com/848918
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#526952}
bratell
Rename GetRestrictedCookieManager for more uniqueness
There are two overloaded GetRestrictedCookieManager functions in
different files which in certain non-standard jumbo configurations
end up in the same translation unit. When that happens,
base::Bind doesn't know which one to use and there is a compilation
error.

This patch renames one of them
GetRestrictedCookieManagerForWorker so that there will never be
any confusion.

Bug: 746953
Change-Id: I7b3e6ba32aed44e575ee108111871e45b5e2689c
Reviewed-on: https://chromium-review.googlesource.com/847010
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526754}
bratell
Avoid importing base::Time into the global scope because X11
base::Time in the global scope collides with X11 headers which
have a global typedef of Time to int. This patch moves the code so
that the symbols are imported into the local namespace (content)
instead.

X11 headers appear in some non-standard jumbo configurations
(extremely large jumbo chunks) but could happen at any time
otherwise as well.

Bug: 746953
Change-Id: Iadc929ca4eb7d556490d58c791bbe8b2ef119726
Reviewed-on: https://chromium-review.googlesource.com/848916
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526731}
bratell
Avoid collision between two ScriptExecutionCallbackHelper
ScriptExecutionCallbackHelper is the name of two different
helper functions which in some non-standard jumbo configurations
(huuuge jumbo chunks) end up in the same translation unit. This
patch changes the scope of one of the classes to not clash.

Bug: 745732
Change-Id: Ifed9bcd247c43afb110c9b008062383a2a7d74df
Reviewed-on: https://chromium-review.googlesource.com/848835
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526690}
bratell
Changed some test code to avoid jumbo problems
In certain non-standard jumbo configurations (very large
jumbo units) there were some symbol clashes that do not
appear in normal jumbo builds. This resolves them by
renaming one test class to better match the test, and by
wrapping the other test in a custom namespace as done in other
places in blink tests.

Bug: 745732
Change-Id: Ic0388e9abd19b24366133c577059f59ef63a6b6b
Reviewed-on: https://chromium-review.googlesource.com/847009
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526543}
bratell
Hide DeviceMode from X11 headers
X11 headers create a lot of macros using fairly normal names which
causes collisions in code that was written without X11 headers in
mind.

DeviceMode is also a type in components/policy and if that and
X11 includes end up in the same translation unit, there will be
compilation errors.

This was encountered in non-standard jumbo configurations and will
not affect currently supported code.

Bug: 782184
Change-Id: I84f9874d2858fc60c7e7c0e017d028dc8b710661
Reviewed-on: https://chromium-review.googlesource.com/847577
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526524}
bratell
Rename one set of kDataPrefix/kMetadataPrefix to make them unique
There are two sets of kDataPrefix and kMetadataPrefix in
components/sync and they have different values. In non-standard
jumbo configurations (much larger jumbo chunks than normal) those
will end up in the same translation unit and clash.

This renames one set of constants, leaving the other one as is
since its name already matches the use well.

Change-Id: I3640f1c1e7bc599c7d20317cd60d2f1ac7d90b15
Reviewed-on: https://chromium-review.googlesource.com/847593
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526522}
bratell
Rename ChildAt and Parent to get unique names.
To help jumbo compilations, this code has already renamed
Children -> LayerChildren so this follows the same pattern
to help some other jumbo configurations where the plurality
of ChildAt and Parent methods caused problems.

Bug: 786926
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I086022931622b1bb670bc1313987ff69182c0990
Reviewed-on: https://chromium-review.googlesource.com/847473
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526521}
bratell
Add include guards to highcontrast_classifier.h
Several files include highcontrast_classifier.h so jumbo builds
got duplicate instances of everything in the header file.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibfe824f52d4b1f6046b75e4621f662ce0bf1d0c3
Reviewed-on: https://chromium-review.googlesource.com/847572
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526470}
bratell
Removed dead GetImageInfo() function noticed in jumbo builds
There are two identical GetImageInfo functions in the blink/html
code and only one of them is used. This patch deletes the unused
one.

This was noticed in a non-standard jumbo configuration because both
instances ended up in the same translation unit.

Change-Id: I4b0959fcc1bf9a0902a6d8574023e9b59de60375
Reviewed-on: https://chromium-review.googlesource.com/847474
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526467}
bratell
Undefine Win32 macros IsMinimized, IsRestored, IsMaximized
Names used in the BaseWindow class are also windows.h macros.
That the names are the same as in the Windows API is
no coincidence but for now we don't want the Windows macros
to interfere so we undef them.

There are already undefs in widgets.h but depending on the order
of includes they might not be effective.

Bug: 773275
Change-Id: I2be80c8a3f64f4741163def9c27e386c95753a40
Reviewed-on: https://chromium-review.googlesource.com/845582
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526694}
bratell
Make timeit.bat handle some non-US locales better
timeit.bat assumed the decimal separator was a period. Sometimes
it's a comma.

Change-Id: Id8d04f980907dda0d80af96be8568b1704b61399
Reviewed-on: https://chromium-review.googlesource.com/844322
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526285}
bratell
Be explicit about base::Time to not mix it up with X11 Time.
There is an X11 typedef for a type called ::Time so if becomes
complicated if code imports another type named Time into the
global namespace with "using base::Time". Better is to just
write base::Time whenever you mean base::Time.

This was an issue that hit the jumbo project, implementing
unity builds for Chromium.

Bug: 773275
Change-Id: Ic06f701eba210ef43899d0dc47ba5c891cb71866
Reviewed-on: https://chromium-review.googlesource.com/844695
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526360}
bratell
Move kWebURLsWithTitlesPboardType from global scope in ui/base
There is a kWebURLsWithTitlesPboardType in
third_party/mozilla/NSPasteBoard+Utils.h which causes confusion
with the kWebURLsWithTitlesPboardType in ui/base. This code
moves the definition to a tighter scope which makes symbol lookup
obvious to the compiler.

This caused issues with jumbo builds. Most likely the Mozilla
header doesn't get included in the same translation unit as
clipboard_util_mac.mm in non-jumbo builds.

Bug: 773275
Change-Id: I77e9cc6c7a3beaa600cb620bddc000b1846ab985
Reviewed-on: https://chromium-review.googlesource.com/844697
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526287}
bratell
Don't compile input_method_auralinux.cc in chromeos.
ChromeOS has an input_method_chromeos.cc which contains
for instance GetEngine(). With input_method_auralinux.cc
there will be two GetEngine() which is one too many.

Seen in jumbo builds where code ends up in the same translation
unit so that the compiler notices things like this.

Bug: 773275
Change-Id: I64598e346e0dcbbac5348bd6ec9d903d2041d298
Reviewed-on: https://chromium-review.googlesource.com/844676
Reviewed-by: Shu Chen <shuchen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526284}
bratell
Remove non-ios code from ui/base's ios build
Touch code isn't used by ios so should not be compiled.

In jumbo builds some touch symbols but not others ended up
in an object file and then the ios linker got unhappy. This
used to work by "luck" (i.e. if not a single symbol is used in
an object file, then it doesn't matter if that object file
refers to non-existing symbols).

Bug: 773275
Change-Id: I08ea7005665a62728aeac1bf7cce16bca8be8402
Reviewed-on: https://chromium-review.googlesource.com/844714
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526228}
fs
Remove SVGElementRareData::owner_
This appears to have been dead/unused since the complicated weak
handling for SVGCursorElement was removed in
https://codereview.chromium.org/2522443002 (together with
SVGCursorElement itself.)

Simplify SVGElement::EnsureSVGRareData a little while at it.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I0e29e2830bc20fd595d41d72eb9c3ec23c2df2ce
Reviewed-on: https://chromium-review.googlesource.com/843023
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#526071}
bratell
Add missing include guard to test_overscroll_delegate.h
Change-Id: I3a9785519bfe9d6b10972bbe7b70a3c9c3f5fdbc
Reviewed-on: https://chromium-review.googlesource.com/842803
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526029}
mpichlinski
Allow delegate to handle ContentMainRunner fatal initialization error.
Report ContentMainRunner fatal error during initialization to the delegate,
which may gracefuly exit with some message instead crashing.
Default behavior is CHECK(false).

Bug: 792839
Change-Id: I1e7c85c58f1a008e8818e2efb00dbba7f4774826
Reviewed-on: https://chromium-review.googlesource.com/815054
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527056}
bratell
Giving two different kDefaultTransationDurationMs unique names
The animation code has two different
kDefaultTransationDurationMs depending on what code is used.
This caused issues with jumbo builds where one of them
shadowed the other one (scary). This renames them so that they
have unique names, and also moves them into the same scope to
keep things consistent.

Bug: 773275
Change-Id: I77b5ab72e48a9c967105d8eb0b2610cfbd6f0b40
Reviewed-on: https://chromium-review.googlesource.com/841063
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526028}
bratell
Deduplicate kInchInMm so that they don't clash in jumbo builds
There is one kInchInMm in the anonymous namespace in
fake_display_snapshot.cc and one in
chromeos/display_change_observer.cc. In jumbo builds they
end up in the same translation unit and have the same
anonymous namespace.

Since the constant is needed in more than one place, an easy change
is to move it to display_util.h.

Bug: 773275
Change-Id: I579a587786ea3fac5dd6dde85f51bd5ae1a62e69
Reviewed-on: https://chromium-review.googlesource.com/840024
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525814}
fs
[PE] Avoid integer overflows in EnclosingIntRect(const FloatRect&)
The size computation could potentially overflow, yielding an "empty"
result, which could have different consequences depending on the user.
In CullRect::UpdateCullRect for instance, the MapRect call could make
the cull rectangle appear empty causing visible elements to be culled.

Rather than using integers for the computing the enclosing rect, use
floats, and then cast that to an IntRect at the end. (The
IntRect(const FloatRect&) constructor clamps the input using clampTo.)

Adjust EnclosedIntRect similarly because it shares the same deficiency.

Bug: 793676
Change-Id: I63bcff3747dea7f29dac39a05d9cf179b0770030
Reviewed-on: https://chromium-review.googlesource.com/839521
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525812}
bratell
Renamed two g_lock in ui/gfx to have more unique names
Recently a second g_lock joined the first g_lock in ui/gfx and
then they clashed in jumbo builds. This patch renames them
to match their use.

Bug: 773275
Change-Id: I9b13a8f225d0ee22aca621fa32d4c6872429af0a
Reviewed-on: https://chromium-review.googlesource.com/839765
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525771}
bratell
Give two different EnumMonitorCallback functions unique names
There are two classes in ui::display that enumerate monitors
to get information about them. They both used a local
callback named "EnumMonitorCallback" and those two functions
clashed in jumbo builds where they shared the same translation
unit.

Bug: 773275
Change-Id: Ibb0889705d28c0169a210bc3e83411adb66216c7
Reviewed-on: https://chromium-review.googlesource.com/836560
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525672}
bratell
Rename one of two DisplayInfoLists in ui/display
There is a display::DisplayInfoList in
display_manager.h so creating another one by the same name
inside display is confusing. At least that is what the
compiler thinks in the jumbo project where they end up
being known in the same translation unit.

Bug: 773275
Change-Id: I545cc9e8a64cbf3e61435da49c50cd72e360c61e
Reviewed-on: https://chromium-review.googlesource.com/837761
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525512}
bratell
Use differently named functions for each jpeg codec.
In ChromeOS there are two JPEG decoders. They have the same API
structure so the helper functions look the same. Unfortunately
they also have the same names so they clash in jumbo builds.

The methods are also unfortunately not reusable since they work
on different types (one work on libjpeg_turbo types, the other
on the IJG jpeg decoder types).

This patch adds the Ijg prefix to the types and functions used by
the "robust" codec.

Bug: 773275
Change-Id: I73b44c019ca72adbc3db04011c61550a0034ec85
Reviewed-on: https://chromium-review.googlesource.com/836899
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525447}
bratell
Rename one of the two NOTIFY_OBSERVERS macros
There was still two NOTIFY_OBSERVERS macros and in jumbo builds
they triggered an error about macros being redeclared. This
patch renames the macro that implements observer handling
methods for Windows from NOTIFY_OBSERVERS to NOTIFY_OBSERVERS_METHOD.

Bug: 773275
Change-Id: Ie58fd1793b144b694a0a34bfa552569db3f8a200
Reviewed-on: https://chromium-review.googlesource.com/836611
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525333}
bratell
Use large (non-goma) jumbo chunks for Jumbo Linux x64
When you build with goma jumbo uses smaller units (up to
8 files per jumbo chunk). This is to be more parallel and
take advantage of the -j 1000 hardware.

Unfortunately many problems are only detected if you combine
many files in a unit so default goma builds would not find
those problems.

This patch changes one of the three Jumbo fyi builders to use
jumbo_file_merge_limit=50 which is the normal value for
non-goma jumbo builds. This way we should notice more problems
through the fyi builders.

Change-Id: Id7d49148e778a92648a1871d15dbf1c8a958af7e
Reviewed-on: https://chromium-review.googlesource.com/832435
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524990}
jl
Rename conflicting `g_test_observer` variables
Two source files declared `g_test_observer` variables in the anonymous
namespace. In jumbo/unity builds, these conflict and cause compilation
errors. Give them more unique names to avoid the collision.

Change-Id: I904c5409039a9599480ca3a8fd7bbed4f48db1f6
Reviewed-on: https://chromium-review.googlesource.com/829173
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524796}
jl
Drop `using namespace X` directives
They are not allowed by the Google C++ coding style.

Also, in jumbo/unity builds where the source files are included into a
larger translation unit, clang treats the them as header files, and warns
about such directives in the global namespace (-Wheader-hygiene).

Change-Id: I3079677651430f1fbeff2a79101aa7314a484488
Reviewed-on: https://chromium-review.googlesource.com/829135
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#524791}
bratell
Renaming one of the NOTIFY_OBSERVERS macros
ui/events/devices have two NOTIFY_OBSERVERS macros, similar but
not identical. This renames one of them NOTIFY_ANDROID_OBSERVERS
to avoid clashes in jumbo builds where they ended up in the
same translation unit.

Bug: 773275
Change-Id: I626bf809be342993bc9f455aab977e4918538446
Reviewed-on: https://chromium-review.googlesource.com/824882
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524752}
bratell
Deduplicated a kAnimationStartOrAfterHideOpacity constant
Both the floating keyboard container and the full width
keyboard container need kAnimationStartOrAfterHideOpacity
so instead of having two of them, this patch moves it to
container_behavior.h.

Bug: 773275
Change-Id: I1196570016881bd58e9f3c73f33f3a674d8fc607
Reviewed-on: https://chromium-review.googlesource.com/824274
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524746}
fs
[CI] Add SVGLengthContext::ResolveLengthPair helper
With geometric presentation attributes it's quite common to need to
resolve an <x, y> pair of Lengths to produce a point or a size.
Add a helper ResolveLengthPair() that accepts a pair of Lengths and
return a FloatPoint. Except for a reduction in LoC, it also amortizes
the cost of determining a viewport when percentages are used.

Use the new helper for 'cx' / 'cy' and 'rx' / 'ry' on <ellipse>,
'cx' / 'cy' on <circle>, 'x' / 'y', 'width' / 'height' and 'rx' / 'ry'
on <rect>, 'x' / 'y' and 'width' / 'height' on <image> as well as
'x' / 'y' on <use>.

Since this means using FloatPoint/FloatSize to a larger degree than
before, use the abilities (operators et.c) of these a bit more where
possible.

Bug: 400725
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I15f5c17190b060a7e8312d5e3e124846301804b9
Reviewed-on: https://chromium-review.googlesource.com/832606
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524740}
fs
[PE] Invalidate <use> instances even when mutating from the parser
When a layout is triggered when the parser is interrupted, an instance
tree can be built for a <use> that references a subtree that contains
the insertion point of the parser. This <use> instance (or instances)
would then not be invalidated when the parsing resumed.

Invalidate instances of an element when its children changes even when
the mutation originates from the parser. (This condition was added in
3c2310f2e9e0947e390c25911b61cfe69e162a78 without further explanation
"Only invalidate SVGElementInstances when !changedByParser is set.". Due
to the lazyness of the shadow tree/instance rebuilding this will
hopefully not regress performance.)

Bug: 794594
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I58f3a74ef9812503c0111d3564dad8ee3527d27b
Reviewed-on: https://chromium-review.googlesource.com/832386
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524726}
bratell
Compile fix jumbo builds, be specific about which testing to use
There are two namespaces named testing, there is ::testing
and there is ::blink::testing. Inside blink code you have to
write ::testing to be sure to get the root ::testing namespace.

Depending on how ignorant the compiler is, it might work anyway,
but in jumbo builds the compiler often knows about the
blink::testing namespace.

TBR=leon.han@intel.com

Change-Id: I7617e074dba5cabb813c3a823757e0ba0ce15008
Reviewed-on: https://chromium-review.googlesource.com/832607
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524711}
tmoniuszko
Fix bookmark importing from Firefox
Bug: 638977
Change-Id: I3336f64fc9497417831afa24f8403a63b77797bb
Reviewed-on: https://chromium-review.googlesource.com/817435
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524685}
wdzierzanowski
Avoid race in MSE_Widevine tests
When run with the stub Widevine CDM, these tests suffer from a race
between the result of a failed StubCdm::Decrypt() and a failed
StubCdm::UpdateSession().  The tests expect the latter, but the former
often arrives first.

By allowing the stub to InitializeVideoDecoder() successfully and
returning cdm::kNoKey upon DecryptAndDecodeFrame() attempt we avoid the
DecryptingDemuxerStream errors altogether, so there is no race anymore.

Bug: 768745
Test: 'browser_tests --gtest_filter=*MSE_Widevine*' pass when run with the stub Widevine CDM

Change-Id: I35a35d006d118f8f7f9a8a64cf9334017644f4ea
Reviewed-on: https://chromium-review.googlesource.com/831026
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#524663}
fs
[PE] SVG <use> 'x' and 'y' are presentation attributes
'x' and 'y' were turned into presentation attributes in
https://codereview.chromium.org/896773002 (r190180), but the property
values were not actually applied.
Apply the property values from ComputedStyle, cleaning up the
surrounding code a bit in the process by moving the "is a <use> element"
check into a method. Also fix the FIXME in SVGUseElement::ToClipPath by
using the computed transform from the LayoutObject, rather than
"manually" recomputing it. This code-path should already require a
LayoutObject for the element in question.

Bug: 400725, 697052
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iff261e468c4476cfb98efbadd6989ada027e47ab
Reviewed-on: https://chromium-review.googlesource.com/829314
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524385}
bratell
Prepare service_worker tests for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

content unittests needs about 60 CPU minutes to compile normally.
With jumbo that can be brought down to 4-6.

Bug: 746953
Change-Id: Ic573361fed81bbd46a97823e9761f94088d51814
Reviewed-on: https://chromium-review.googlesource.com/826637
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524357}
jl
Undefine another ENUM_CASE macro after use
This avoids collisions in jumbo/unity builds.

Change-Id: Ibd47b3c0be950c6f9fb5baf206612203c99e9b35
Reviewed-on: https://chromium-review.googlesource.com/827132
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#524351}
bratell
Prepare various storage tests in content for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

Bug: 746953
Change-Id: I093f221ca2017c095f0751d52d70efa44e3fed31
Reviewed-on: https://chromium-review.googlesource.com/826636
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524271}
bratell
Deduplicate and rename some constants in X11 clipboard code
In jumbo builds symbols with the same name that end up in
the same translation unit might clash even if they don't
normally clash. That was the case with a couple of constants
in the ui/base clipboard code for X11.

This patch shares some of the constants (the ones with the same
value) and renames the remaining one.

Bug: 773275
Change-Id: I718cecdf5e490de17217962767322f3c847a3e53
Reviewed-on: https://chromium-review.googlesource.com/824522
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524067}
bratell
Add support for jumbo in content/renderer
Jumbo is a unity build system for Chromium, aimed at dramatically
reducing the compilation times.

So far support has been added to blink, v8, content/browser and
a few smaller targets, reducing the effort by about half. How
that maps to real time depends on hardware. It scales proportionally
for 4 core/8 thread machines, but not in 48 core machines or in
goma.

The effort to compile content/renderer in a use_jumbo_build=true
build is right now about 6% of the total effort when compiling
chrome+content_shell+blink_tests. That is about 51 CPU minutes
on the test hardware. With jumbo that can be brought down to 6-7
CPU minutes, saving about 5 minutes real time on a 4 core/8 thread
machine for every full compilation.

Part of the support is to split away IPC code generation since
its macro based design isn't compatible with jumbo. See
comment in the code for more information.

Bug: 746953
Change-Id: If0cfe05986cdfbdd4974f03119c46c3493f6c63e
Reviewed-on: https://chromium-review.googlesource.com/822417
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524063}
bratell
Prepare appcache tests for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

Bug: 746953
Change-Id: I49b9d127c513ead92c4743d6e5701b80a91db69e
Reviewed-on: https://chromium-review.googlesource.com/824268
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524042}
bratell
Removing dead TransportDIB member sequence_num_
Nobody set or read the ui::surface::TransportDIB member
sequence_num_ and that made the compiler upset in jumbo builds
where the compiler sees more of the whole picture.

Change-Id: Ia59e824e9e6175870065336c6403958878d2dba0
Reviewed-on: https://chromium-review.googlesource.com/826063
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524031}
bratell
Renaming one of two g_linux_input_method_context_factory
Both the real and the testing version of
ui::LinuxInputMethodContextFactory were named
g_linux_input_method_context_factory which caused collisions
in jumbo builds. This renames the testing one to
g_linux_input_method_context_factory_for_testing

Bug: 773275
Change-Id: Ia11a8a16ce5a40ef4a6469fe5bdcfeab2323e068
Reviewed-on: https://chromium-review.googlesource.com/826064
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: Shu Chen <shuchen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524030}
bratell
Gave two kClassIdentifiers unique names
In jumbo builds several cc files are compiled in the same
translation unit and then the different kClassIdentifier
symbols clashed. This renames them to
kPeerConnectionRemoteTrackIdentifier
and
kProcessedLocalAudioSourceIdentifier

Bug: 746953
Change-Id: I7fe95ebbef69f4dd3b47258417cc917ba441dd91
Reviewed-on: https://chromium-review.googlesource.com/822191
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524029}
jl
Enable jumbo for //components/sync
This reduces basic compile time by approximately 90 % (from 830 CPU
seconds to 83 CPU seconds on a pretty standard machine.)

Change-Id: I75a8c0d9e2d057380f89628891987f0acbaa86e5
Reviewed-on: https://chromium-review.googlesource.com/823033
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#526224}
bratell
Declare //ui template instantiations so that all know about it
There were code in ui/views that didn't know about the class
property type specialization for ::wm::ShadowElevation. This was
solved by the linker later since there was other instances
of the right template.

In jumbo builds the compiler noticed that there was code
trying to access the template before the specialization was known
and that is a C++ error so the code did not compile.

The fix is to declare the specialization so that all code knows
about it.

Bug: 773275
Change-Id: Ifa4bc0088a8525a7a9907037d746ecb542dfbf71
Reviewed-on: https://chromium-review.googlesource.com/824665
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523903}
bratell
Removing "using namespace" from ui/events code
using namespace includes a full other namespace into the
global scope and that doesn't work well with jumbo builds for two
reasons: Too many symbols, and "using namespace" isn't allowed
in something that is included.

It is also not allowed by the style guide.

This patch removes the using namespace and uses explicit
namespaces instead. It also changes some repetitive code
to use macros to make it less repetitive and easier to read.

Bug: 773275
Change-Id: If45f81b435920bd9048567ec65f9b142046e86ea
Reviewed-on: https://chromium-review.googlesource.com/824843
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523808}
fs
[PE] Fix text selection of <svg:text> subject to 'textLength'
With 'textLength' and 'lengthAdjust' with the value 'spacingAndGlyphs',
each SVGTextFragment is subject to an additional scale factor that
stretches the glyphs along the x- or y-axis.
This scale factor was not (any longer) taken into account by
SVGInlineTextBox::OffsetForPositionInFragment, which resulted in the
incorrect offset being calculcated.
Apply the (inverse) length_adjust_scale from SVGTextFragment before
querying the font for an offset.

Remove the |include_partial_glyphs| argument from
SVGInlineTextBox::OffsetForPositionInFragment since it's always true,
and also use 'float' rather LayoutUnit for the position.
Remove the dead |horizontal_glyph_stretch_| member variable from TextRun
since it's no longer used (since the simple shaper path was removed.)

Bug: 793075
Change-Id: Ia7d369d914f5afd87d198b7b21077e180fc8bc59
Reviewed-on: https://chromium-review.googlesource.com/824162
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523787}
bratell
Moved two kSlopEpsilon constants that clashed in jumbo builds
Both gesture_detector.cc and scale_gesture_detector.cc have
a local constant kSlopEpison with the same value. Since
I could find no suitable shared place for it, I moved them
into a tighter scope. That way they will not clash in jumbo
builds where several cc files share the same translation
unit.

Bug: 773275
Change-Id: I22c6a452532fbe0b2be3fddb29388a2d65aa901a
Reviewed-on: https://chromium-review.googlesource.com/824241
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523784}
bratell
Rename one of two ItemView classes
There is one ItemView class in notification_view_md.h so if that
header is in the same translation unit as notification_view.cc
then the local ItemView class will fail to compile. That happens
in jumbo builds.

Bug: 773275
Change-Id: I2911c4cbcc73df186d9520d4182a186a76d2ce34
Reviewed-on: https://chromium-review.googlesource.com/824364
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523774}
mharanczyk
Add missing blink_header dep to //third_party/WebKit/Source/platform/heap.
Bug: 794207
Change-Id: Icc7a0654a643c53ecc6cd68d2c3a73e6bd394a81
Reviewed-on: https://chromium-review.googlesource.com/823030
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523749}
bratell
Give some ServiceWorker and TLS related symbols more unique names
In jumbo builds more code compile in the same translation unit
so it's more important to keep the names unique to avoid
compilation clashes.

Bug: 746953
Change-Id: I649731d0725a9c5b5ab0ec72775cc81ea54434a9
Reviewed-on: https://chromium-review.googlesource.com/819556
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523737}
bratell
Gave 3 kMaxMessageChunkSize constants unique names.
There are three very similar pieces of code with identical
constants controlling and this patch renames them so
that they don't clash in jumbo builds.

Jumbo builds compile multiple cc files in the same translation
unit which means that those cc files will share the same
anonymous namespace.

Bug: 746953
Change-Id: I85462687798819212b78926c92d3351f44039583
Reviewed-on: https://chromium-review.googlesource.com/822474
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523723}
bratell
Avoid importing the symbol name "Result"
There are many types in Chromium named Result. When importing
that name into the global (or content) namespace with a
using statement, you run the risk of clashing with another
Result type. That happened in jumbo builds where more code
is compiled per translation unit.

This patch uses the fully qualified name instead of just
Result instead.

Bug: 746953
Change-Id: I5ccfb5e6b70712372a764c89b40a2a9340cc33fb
Reviewed-on: https://chromium-review.googlesource.com/822335
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523722}
bratell
Renamed local BindInterface since it clashed with template
There is a template named BindInterface in
content/public/common/bind_interface_helpers.h so to avoid
compilation failures when that header is included directly
or indirectly (as in jumbo builds), it's better to call
local functions something else than BindInterface.

This renames BindInterface -> BindNamedInterface.

Bug: 746953
Change-Id: Ib595232b8c6c9ae58b5321ff58ad1c2927787631
Reviewed-on: https://chromium-review.googlesource.com/822433
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523721}
jl
Stop importing syncable::WriteTransaction into syncer namespace
In jumbo/unity builds it conflicts with syncer::WriteTransaction defined
in components/sync/syncable/write_transaction.h.

Change-Id: I19a325af6299d955577aec10d36f21b948859035
Reviewed-on: https://chromium-review.googlesource.com/822091
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523502}
jl
Stop importing crypto::Encryptor into syncer namespace
In jumbo/unity builds, it conflicts with syncer::Encryptor defined in
components/sync/base/encryptor.h.

Change-Id: I0b9c4e6eafd88eae46892ff97f2ade41f8c0b99a
Reviewed-on: https://chromium-review.googlesource.com/822090
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523491}
jl
Undefine ENUM_CASE macro after use
Multiple source files in components/sync/ define and use a macro named
ENUM_CASE. Some already undefine it afterwards, but some don't and that
causes issues in jumbo/unity builds where all the source files are
compiled in a single translation unit.

Change-Id: I0ce5d1d0e2008f52c68c8dd174d537b7ef1a42f1
Reviewed-on: https://chromium-review.googlesource.com/817280
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523378}
bratell
Rename one of the FrameMaps to FrameProxyMap
There are two types named FrameMap, one in render_frame_impl.cc
and one in render_frame_proxy.cc. As long as the type isn't
exported that works, but in jumbo builds the cc files are
compiled in the same translation unit which causes collisions.

Bug: 746953
Change-Id: I582d7f032caba1a201ac72c8181eb4c2432cc5bf
Reviewed-on: https://chromium-review.googlesource.com/819636
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523369}
bratell
Renamed two identical methods that checked hwacc state
There is two identical methods named
PP_HardwareAccelerationCompatible and I'm not sure what is
a good place to deduplicate them so this patch only renames
them to unblock jumbo work in content/renderer. The methods
with the same name clashes in jumbo builds where many
cc files are compiled in the same translation unit.

Bug: 746953
Change-Id: I12361f3226bdc7a3c6113201183ec26b263917f4
Reviewed-on: https://chromium-review.googlesource.com/819950
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523221}
bratell
Rename two of the ReleaseOriginalFrame methods
In jumbo builds, the three different ReleaseOriginalFrame
methods in content/renderer/media ended up in the same
translation unit and then Bind() didn't know which one to use

Bug: 746953
Change-Id: I584df28230d29bbc80d9d6cd2884300b7a3d9409
Reviewed-on: https://chromium-review.googlesource.com/819611
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523213}
bratell
Remove the last X11 includes in //ui outside ui/gfx/x/*
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

This means we can remove various undefs in files that have had
problems in the past.

Bug: 782184
Change-Id: Ie48fe619e3101344d53ea837b0b21570516185ca
Reviewed-on: https://chromium-review.googlesource.com/814676
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523149}
bratell
[jumbo] Too many CurrentWorkerId()
cache_storage and notifications both had "CurrentWorkerId()" with
the same (trivial) implementation but used differently. For
jumbo builds to not have those clash, this patch renames the
one in notifications -> NotificationWorkerId()

Bug: 746953
Change-Id: Ic00a4e23448bd2d50315a5561f798ed40be56fdc
Reviewed-on: https://chromium-review.googlesource.com/819558
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523146}
bratell
[jumbo] Avoid using the same kMaxNumberOfBuffer name everywhere
In jumbo many files compile together in the same translation
unit and then they share anonymous namespace so if they
use the same constant name, such as kMaxNumberOfBuffers or
kDefaultNumberOfBuffers, they will clash.

Bug: 746953
Change-Id: I0ce707eac13d4f928e482ee62f0d112c69900dae
Reviewed-on: https://chromium-review.googlesource.com/819830
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523142}
fs
[PE] Fix transform-origin on SVG <text>
LayoutSVGText would not compute the correct transform if subjected to a
transform-origin (or transform) with percentages, since the transform
had to be computed early in UpdateLayout in order to allow a font to be
chosen based on the current transform.

Rearrange the code in LayoutSVGText::UpdateLayout a bit to allow the
transform computation to use the correct bounding box, but also compute
a tentative transform before updating the font and its metrics.

Remove the special-case in SVGElement::CalculateTransform and simplify
accordingly.

Bug: 225799
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I34728dfeaafba72c9f3195a29fbdd14673d186c2
Reviewed-on: https://chromium-review.googlesource.com/817734
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#523141}
bratell
Remove X11 includes and replace with the ui/gfx/x/x11.h wrapper
X11 headers pollute the global namespace with macros with
common words like None, Status, False. To avoid problems
because of that we now wrap X11 includes in ui/gfx/x/x11.h
and move all problematic words to the x11 namespace.

Bug: 782184
Change-Id: I81859c8aabae677c40614d3c26036c5d4d1e715a
Reviewed-on: https://chromium-review.googlesource.com/819731
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523121}
bratell
[jumbo] undef STATIC_ASSERT_ENUM after use
Many files define their own STATIC_ASSERT_ENUM macro. When
those files, in a jumbo build, end up in the same translation
unit, there will be clashes.

For macros that clash, the simplest fix is to undef them after
use to reduce the scope where the symbol is available.

Bug: 746953
Change-Id: Id0d22ed46663c79ce5a43e5f09420b1758bf1d88
Reviewed-on: https://chromium-review.googlesource.com/819633
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523116}
bratell
Avoid using GetMessage in Windows since its a Win macro.
Depending on whether certain headers had been included,
GetMessage was a macro that expanded to GetMessageW. This
caused later linker errors in jumbo builds.

This patch renames the function GetIpcMessage to avoid any
confusion.
Alternatives are:
* #undef the macro (can cause problems with later code)
* Make sure that everyone that includes dwrite_font_fake_sender_win.h
also has Windows.h included so that the macro is always there.

Bug: 746953
Change-Id: Ia172ee74dc430c5fb25d676f018695dc001f3470
Reviewed-on: https://chromium-review.googlesource.com/819552
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523107}
bratell
Windows jumbo compile fix. NO_ERROR is a macro in Windows
Windows headers define a macro named NO_ERROR so it is
best to avoid that name. This renames the new NO_ERROR
enum value to CBOR_NO_ERROR, similar to GL_NO_ERROR.

Bug: 780504
Change-Id: I83aa3b83b9239659c296687a9109f255b272a1ce
Reviewed-on: https://chromium-review.googlesource.com/819251
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523097}
fs
Remove local BlendFloatPoint from SVGPathBlender.cpp
AnimationUtilities.h has a Blend(...) overload for FloatPoints - which
differs only by the type of the |progress| argument (double vs. float),
so use the one from AnimationUtilities.h.
Also reduce type-impedance by making |progress_| and |add_types_count_|
from SVGPathBlender::BlendState double and float respectively, since these
conversions are otherwise done over and over.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I34801971030ba082a2b2ebe66c1227314b6a5709
Reviewed-on: https://chromium-review.googlesource.com/816799
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#522777}
bratell
[jumbo] Ignore some more file types people put in sources lists
*.js and *.css files (used in //extensions) are not dangerous
to have in sources lists so silently let them be.

Bug: 787836
Change-Id: I8dc2c16505594ed5342cad008dc1ca8b5a499b73
Reviewed-on: https://chromium-review.googlesource.com/814554
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522731}
bratell
Add support for jumbo builds to ui/views
Jumbo is unity build system for Chromium, where files are
merged before compilation. This gives a much lower resource
requirement for compiling since headers only have to be
compiled once and only one set of template instances has to
be generated (and because of some other reasons).

This is expected to lower the resource usage for compiling
chrome+content_shell+blink_tests by 1%.

Bug: 773275
Change-Id: I6db13afe6147a9186d48c6796b7331d502ea939c
Reviewed-on: https://chromium-review.googlesource.com/786471
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522724}
bratell
Replace X11 includes in media with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

I believe the references to min and max came from an include of
<X11/Xlibint.h>. I can't find such an include anymore and
the one in user_input_monitor_linux.cc doesn't seem needed so
I removed all undefs of min and max and all includes of that
header.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I3a09cccee04eb312ab6b2575be01753df8a1f137
Reviewed-on: https://chromium-review.googlesource.com/806217
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522723}
bratell
Remove a dead code block in content/common/BUILD.gn
A code block for linux without use_seccomp_bpf tried to
remove files that were never added. Since it doesn't
crash, the code is unused.

Change-Id: Ib0bd9d3c9dffa400f3be5c5027c9f959e62124d2
Reviewed-on: https://chromium-review.googlesource.com/814398
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522561}
bratell
Inline ConvertSyncSocketHandle to avoid duplicate symbols
The symbol name ConvertSyncSocketHandle is longer than the
code so inlining it makes the code shorter and possibly smaller.

This is primarily triggered by jumbo build errors.

Bug: 746953
Change-Id: I661209ae56c7c4605ed0ba7426d19eecc095f6e9
Reviewed-on: https://chromium-review.googlesource.com/814674
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522558}
bratell
Be explicit about the testing namespace because there are two
There is both a ::testing and ::blink::testing namespace and if
you refer to just "testing" inside the ::blink namespace you can
get either one depending on what the compiler knows.

This broke jumbo builds where the compiler knew about
::blink::testing and thought "testing" meant ::blink::testing
instead of ::testing.

The fix is to use the :: prefix.

Change-Id: I15b2502a5b15ef585816faae843a97b3d2d73c93
Reviewed-on: https://chromium-review.googlesource.com/813775
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522401}
fs
Remove dead Blend() code
(last use probably removed by https://codereview.chromium.org/2750293003
and similar earlier CLs.)

ShadowList: :Blend and BasicShape::Blend/CanBlend are no longer used
Change-Id: I3d9690768f64fa8c602b55cb1a0bf8654100e04c
Reviewed-on: https://chromium-review.googlesource.com/809012
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#522104}
bratell
Declare //ui template instantiations so that all know about it
There were code in ui/views that didn't know about the class
property type specialization for gfx::Insets* and Views* so they
got the default template implementation.

In jumbo builds the compiler noticed that there was code
using the default implementation before the specialization
appeared and it triggered a compilation error.

The fix is to declare the specialization so that all code uses it.

Bug: 773275
Change-Id: Ifa925a2002ba930af16dc6940a04b2a480721438
Reviewed-on: https://chromium-review.googlesource.com/786190
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521803}
fs
Make the Length(LengthType) constructor explicit
Per coding style:

https: //google.github.io/styleguide/cppguide.html#Implicit_Conversions
Change-Id: Ic7a05422e72b3e445236b054d887b5467f79ab6c
Reviewed-on: https://chromium-review.googlesource.com/809010
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521786}
bratell
Replace X11 includes in viz with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ida4d26422f44edda1a0120f52ffbaa4e437ab012
Reviewed-on: https://chromium-review.googlesource.com/805814
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521740}
bratell
Replace X11 includes in //gpu with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I10a9acecb8e7adacd170d1080a411bc9d1e49f79
Reviewed-on: https://chromium-review.googlesource.com/806275
Reviewed-by: Victor Miura <vmiura@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521659}
fs
Eliminate some unnecessary copies of Lengths
Using the Length store directly should work fine most of the time, and
avoids the fairly bloaty Length copy constructor and destructor pair.

Some minor massaging of ValueForPositionOffset required, but otherwise
straightforward.

Change-Id: I1b1d0b14f3897fc4173eab123cc3b241b28c70d3
Reviewed-on: https://chromium-review.googlesource.com/806834
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521473}
fs
Simplify some Length comparisons with 'auto'
Using Length::IsAuto() is more efficient (and generates significantly
less code) than constructing a new Length and comparing with that.

Also replace some open-coded "is auto" checks with said method, and
simplify the surrounding code a bit.

Change-Id: I974a28a0eef969b56557428eb019f7cf1dac18c1
Reviewed-on: https://chromium-review.googlesource.com/806170
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521456}
bratell
Support jumbo in content/{utility,public,gpu,network}
Jumbo is a unity build system aimed at dramatically reducing
compilation times by merging cc files into larger translation
units.

This change will remove about 6 CPU minutes from the effort to compile
chrome+content_shell+blink_tests on the reference hardware. This is
slightly less than 1% of the total effort in a jumbo build.

Bug: 746953
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I19856815c50724004d11a7e5342e84bff802e6f4
Reviewed-on: https://chromium-review.googlesource.com/801013
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521317}
bratell
Clear //remoting from direct X11 includes
X11 headers pollute the global namespace. Instead we use a
wrapper header (ui/gfx/x/x11.h) that puts important symbols
in the x11 namespace and removes them from the global namespace.

Bug: 782184
Change-Id: I3173f2dde17e6991cc31bd89ceaee8e651ccaf3f
Reviewed-on: https://chromium-review.googlesource.com/801390
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521303}
bratell
Adding jumbo to blink/common.
All of blink already supports blink, except for code that has been
overlooked. This directory, third_party/WebKit/Source/common,
was such an overlooked piece of code.

Change-Id: Ifc9cd0ab64f99d686d3139c367d576a7390408d3
Reviewed-on: https://chromium-review.googlesource.com/796793
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520918}
mpichlinski
CHR-6375: [Windows] Fixed crash on fallback from ANGLE to SwiftShader.
During fallback from ANGLE to SwiftShader it is required to unload
ANGLE libraries, otherwise SwiftShader will fail to load its own
libGLESv2.dll.

Fixed ANGLE platform reset.

Fixed order in ShutdownGL.

Bug: 760063
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: If8797b49f2b5d04cb610302f96c82011dee9b3a9
Reviewed-on: https://chromium-review.googlesource.com/774296
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520730}
bratell
Change X11/* includes to ui/gfx/x/x11.h includes
Includes from the X11 system libraries declare macros with common
names such as None, True, False, Status and those complicate
the life for other code. To avoid that complication we have
moved the common symbol names to the namespace x11 and changed
so that you include "ui/gfx/x/x11.h" instead.

Bug: 782184
Change-Id: I3d2893425bb79cb29d6c5a602512a0e8d3cc30cd
Reviewed-on: https://chromium-review.googlesource.com/800550
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520671}
bratell
Support jumbo in third_party/WebKit/Source/platform/instrumentation
Jumbo is a unity build system for Chromium, aimed at reducing
compilation times by merging cc files into larger
translation units.

This is 0.1% of the total build time so not very much but also
the final remaining part of blink/platform. And all the CPU
minutes add up.

Bug: 761475
Change-Id: Id0643d869960a660a91a4f3a9a23b4585f9e0073
Reviewed-on: https://chromium-review.googlesource.com/785678
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520656}
bratell
Forward declare WebUIMessageHandler in the right namespace
A header forward declared a WebUIMessageHandler in the global
namespace which seriously confused jumbo builds since the
actual WebUIMessageHandler is in the content namespace.

Change-Id: I623b2f729d03dbea199c27f62790f8119d0e3926
Reviewed-on: https://chromium-review.googlesource.com/800933
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520646}
wdzierzanowski
Prevent flakiness of histogram tests in //media
Initialize base::StatisticsRecorder early in the test suite to ensure
histogram pointers created at any moment during test execution are
available globally.

See https://codereview.chromium.org/2901703002 for a more complete
explanation.

Change-Id: Ib2c81dd8ef960168355c53dbc80f2a7833153483
Reviewed-on: https://chromium-review.googlesource.com/800431
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520632}
bratell
Fix include guard for test_fileapi_operation_waiter.h
Change-Id: Iaa408e8195368c736370a8aee78fe3ceec741a59
Reviewed-on: https://chromium-review.googlesource.com/788050
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520346}
bratell
Clearing content from include <X11/*>
X11 headers leak a lot of macros named things like None, Status, True,
False and they cause problems with normal code. To avoid that we now
wrap all commonly named symbols in an x11 namespace and include
"ui/gfx/x/x11.h" instead of <X11/*>.

Bug: 782184
Change-Id: I37bf100f2d2acc5d51ec62051e90939b56d9f690
Reviewed-on: https://chromium-review.googlesource.com/797034
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520344}
bratell
Add support for jumbo builds to ui/aura
Jumbo is unity build system for Chromium, where files are
merged before compilation. This gives a much lower resource
requirement for compiling since headers only have to be
compiled once and only one set of template instances has to
be generated (and because of some other reasons).

This is expected to lower the resource usage for compiling
chrome+content_shell+blink_tests by 0.5%.

Bug: 773275
Change-Id: I1be67ab58e42ea8fbe8537f719b05ca3082aa3c5
Reviewed-on: https://chromium-review.googlesource.com/786470
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520297}
fs
Update the computed transform when the reference box changes
When the object bounding box (for 'fill-box') or the viewport (for
'view-box') changes, we need to update the transform as well.
Add a bool to LayoutSVGShape to track if the transform depends on the
reference box, to make checking this quicker.

Bug: 595829
Change-Id: Ie7429553e78b08f7a574b1e7beae30c738250078
Reviewed-on: https://chromium-review.googlesource.com/796271
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520259}
fs
A 'transform-box' change can yield a different transform
We wouldn't invalidate as needed if the 'transform-box' property changed
its value.

Bug: 595829
Change-Id: Ibcaa9e94b54b99724f2d3e1ca5dedd868d85b776
Reviewed-on: https://chromium-review.googlesource.com/796213
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#520211}
bratell
Adding include guard to mock_leveldb_wrapper.h
Change-Id: Idf7504a625141e1177b4fe2457608847e7120fc4
Reviewed-on: https://chromium-review.googlesource.com/797031
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520139}
fs
WPT tests for the 'transform-box' property
Basic tests for 'fill-box' and 'view-box' with various viewport
configurations.

Bug: 595829
Change-Id: I81ec92e958c5ec240c7932219371b6c5369f5ac5
Reviewed-on: https://chromium-review.googlesource.com/796211
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#520111}
fs
Make stroke bounding boxes for <line> tighter
Since <line> elements are just a two point line segment, it does not
have any line joins and thus needn't apply any correction for the miter.

Bug: 435097, 788340
Change-Id: Ie7e9d89e0f7c741cf7cf40b3af82521869bb5b54
Reviewed-on: https://chromium-review.googlesource.com/790294
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#519779}
bratell
Renaming the Mac specific MenuController -> MenuControllerCocoa
There were two public classes, both in //ui, named MenuController
and they clashed in jumbo builds and probably contributed to
some confusion.

This patch renames the one for Mac MenuControllerCocoa

Bug: 773275
Change-Id: I3d0d3e98a120c0df3da47cc691b48cdf89e51d6f
Reviewed-on: https://chromium-review.googlesource.com/791610
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519414}
fs
Override CanRender in StyleInvalidImage
A StyleInvalidImage can never be rendered (GetImage always return
nullptr), so returning true - like the base class does - seems to be
sending the wrong signals.

Bug: 773272
Change-Id: I5ca20db512ce8b0e92546d626a4a6a2d85ed7908
Reviewed-on: https://chromium-review.googlesource.com/785651
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#519390}
fs
Add documentation to the StyleImage hierarchy
Bug: 773272
Change-Id: I643ef81395c1f5aa051265bb6fe90073289948c4
Reviewed-on: https://chromium-review.googlesource.com/785650
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519355}
bratell
Jumbo compile fix: Rename one of the TaskQueueManagerForTest
There are two (identical but small) TaskQueueManagerForTest
classes in renderer_scheduler_test_support.cc and
create_task_queue_manager_for_test.cc.

In jumbo builds where these files are compiled in the same
translation unit, they will clash and cause compilation errors.

This patch renames on of them
TaskQueueManagerForRendererSchedulerTest

(Followup to

https: //chromium-review.googlesource.com/c/chromium/src/+/763511 )
Change-Id: Ia282d00e2982744d8842df17455eaf599f2bd280
Reviewed-on: https://chromium-review.googlesource.com/790514
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519318}
bratell
Jumbo build fix: Too many Mixin classes in oilpan tests.
Both HeapTest.cpp and IncrementalMarkingTest.cpp use local
test classes named Mixin. When compiled together in the
same translation unit, it will not compile.

TBR=haraken@chromium.org

Change-Id: Idfdfae3a9d81c5a1ad7d039818e06e11157806ef
Reviewed-on: https://chromium-review.googlesource.com/789863
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519292}
bratell
Gave two global instance variables unique names
in jumbo builds two files with global variables named
instance clashed. This renames them to
g_transient_window_client_instance and
g_window_stacking_client_instance

Bug: 773275
Change-Id: I29dd9ef7e792959b128e99242b6ec6e13be183a8
Reviewed-on: https://chromium-review.googlesource.com/786236
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519277}
fs
A stroke-width of zero should not generate geometry
A stroke-width of 0 is a valid value, but "is not painted" according to
spec. This can be interpreted as not generating any geometry, and so not
even "pointer-events: stroke" would cause anything to be hit.

Check for a zero stroke-width in LayoutSVGShape::StrokeContains and fail
the hittest in that case. This matches what the painting code-path does,
except we don't check for the existence of a stroke here, because we
need to handle the !has-stroke case too.

Bug: 459640
Change-Id: I508fae7c43873027331ffaa4b9e20783d949fc15
Reviewed-on: https://chromium-review.googlesource.com/788853
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519143}
bratell
Add include guard for video_capture_jpeg_decoder.h
Change-Id: Ibd90d0f605121acfe707d27090497c97f905a312
Reviewed-on: https://chromium-review.googlesource.com/787972
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519102}
bratell
Let jumbo ignore known strange files in sources lists
Many targets end up with stray files in their sources list,
files which trigger no toolchain. Jumbo used to assert that this
was bad but since other tools handle it silently, jumbo
should also be a bit more forgiving.

Bug: 787836
Change-Id: Ib70c3c5a053621de656af15fb4fcc413673db93c
Reviewed-on: https://chromium-review.googlesource.com/785811
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518979}
fs
Simplify SetNeedsResizeObserverUpdate invocations in LayoutSVG*
We can avoid calling this method for cases where we know the bounds have
not changed. Sink calls in the LayoutSVGShape hierarchy out of
UpdateShapeFromElement to a single callsite in
LayoutSVGShape::UpdateLayout. Also, no need to null-check the Element.

Bug: 435097
Change-Id: I2aca3056c9d016a30f6a54da29a719c9c9f3710c
Reviewed-on: https://chromium-review.googlesource.com/787650
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#518952}
fs
Use the same bounding box computation even with fallback path
LayoutSVGShape::UpdateShapeFromElement() creates a Path for the shape as
well as update the bounding box (fill/object and stroke.)
When we fallback to using a Path rather than the fast path
representation for the shape, we can still use the same code for
computing the bounding boxes. So instead of calling LayoutSVGShape's
UpdateShapeFromElement from LayoutSVGRect and LayoutSVGEllipse, just
call CreatePath() in the codepaths that transitions to the fallback/Path
codepath. Non-scaling stroke still require a "precise" stroke bbox.

This should make stroke bounding boxes for <rect>, <circle> and
<ellipse> tighter again.

Bug: 435097
Change-Id: I5361689371cb78eb405e0403f3be165bd254aab2
Reviewed-on: https://chromium-review.googlesource.com/779460
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#518880}
bratell
Typo fix in sources list. File missing .h.
Adding the missing .h.

Change-Id: Ie2d4f9df6c48ba73180cb6bdec8d55b352865928
Reviewed-on: https://chromium-review.googlesource.com/786015
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518877}
bratell
Rename one of two "UseMd()" in ui/views
Both bubble/bub